Skip to content

refactor: Bump prettier from 2.0.5 to 3.5.3 #9671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: alpha
Choose a base branch
from
22 changes: 13 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"node-abort-controller": "3.1.1",
"node-fetch": "3.2.10",
"nyc": "17.1.0",
"prettier": "2.0.5",
"prettier": "3.5.3",
"semantic-release": "24.2.3",
"typescript": "5.8.3",
"typescript-eslint": "8.29.0",
Expand Down
107 changes: 55 additions & 52 deletions spec/AudienceRouter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,59 +317,62 @@ describe('AudiencesRouter', () => {
);
});

it_id('af1111b5-3251-4b40-8f06-fb0fc624fa91')(it_exclude_dbs(['postgres']))('should support legacy parse.com audience fields', done => {
const database = Config.get(Parse.applicationId).database.adapter.database;
const now = new Date();
Parse._request(
'POST',
'push_audiences',
{ name: 'My Audience', query: JSON.stringify({ deviceType: 'ios' }) },
{ useMasterKey: true }
).then(audience => {
database
.collection('test__Audience')
.updateOne(
{ _id: audience.objectId },
{
$set: {
times_used: 1,
_last_used: now,
},
}
)
.then(result => {
expect(result).toBeTruthy();
it_id('af1111b5-3251-4b40-8f06-fb0fc624fa91')(it_exclude_dbs(['postgres']))(
'should support legacy parse.com audience fields',
done => {
const database = Config.get(Parse.applicationId).database.adapter.database;
const now = new Date();
Parse._request(
'POST',
'push_audiences',
{ name: 'My Audience', query: JSON.stringify({ deviceType: 'ios' }) },
{ useMasterKey: true }
).then(audience => {
database
.collection('test__Audience')
.updateOne(
{ _id: audience.objectId },
{
$set: {
times_used: 1,
_last_used: now,
},
}
)
.then(result => {
expect(result).toBeTruthy();

database
.collection('test__Audience')
.find({ _id: audience.objectId })
.toArray()
.then(rows => {
expect(rows[0]['times_used']).toEqual(1);
expect(rows[0]['_last_used']).toEqual(now);
Parse._request(
'GET',
'push_audiences/' + audience.objectId,
{},
{ useMasterKey: true }
)
.then(audience => {
expect(audience.name).toEqual('My Audience');
expect(audience.query.deviceType).toEqual('ios');
expect(audience.timesUsed).toEqual(1);
expect(audience.lastUsed).toEqual(now.toISOString());
done();
})
.catch(error => {
done.fail(error);
});
})
.catch(error => {
done.fail(error);
});
});
});
});
database
.collection('test__Audience')
.find({ _id: audience.objectId })
.toArray()
.then(rows => {
expect(rows[0]['times_used']).toEqual(1);
expect(rows[0]['_last_used']).toEqual(now);
Parse._request(
'GET',
'push_audiences/' + audience.objectId,
{},
{ useMasterKey: true }
)
.then(audience => {
expect(audience.name).toEqual('My Audience');
expect(audience.query.deviceType).toEqual('ios');
expect(audience.timesUsed).toEqual(1);
expect(audience.lastUsed).toEqual(now.toISOString());
done();
})
.catch(error => {
done.fail(error);
});
})
.catch(error => {
done.fail(error);
});
});
});
}
);

it('should be able to search on audiences', done => {
Parse._request(
Expand Down
10 changes: 2 additions & 8 deletions spec/Auth.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,10 @@ describe('extendSessionOnUse', () => {
const { shouldUpdateSessionExpiry } = require('../lib/Auth');
let update = new Date(Date.now() - 86410 * 1000);

const res = shouldUpdateSessionExpiry(
{ sessionLength: 86460 },
{ updatedAt: update }
);
const res = shouldUpdateSessionExpiry({ sessionLength: 86460 }, { updatedAt: update });

update = new Date(Date.now() - 43210 * 1000);
const res2 = shouldUpdateSessionExpiry(
{ sessionLength: 86460 },
{ updatedAt: update }
);
const res2 = shouldUpdateSessionExpiry({ sessionLength: 86460 }, { updatedAt: update });

expect(res).toBe(true);
expect(res2).toBe(false);
Expand Down
Loading
Loading