Skip to content

build: Release #2188

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

Merged
merged 42 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f673df6
refactor: Convert helper functions to TypeScript (#2132)
dplewis May 16, 2024
22360b4
fix: `Parse.Installation` not working when installation is deleted on…
dplewis May 16, 2024
094f440
chore(release): 5.1.1-alpha.1 [skip ci]
semantic-release-bot May 16, 2024
3123819
refactor: Fix TypeScript type correctness test (#2134)
dplewis May 16, 2024
dbf9c91
refactor: Run ESLint against TypeScript files (#2135)
dplewis May 17, 2024
8e189cf
refactor: Bump eslint-plugin-jsdoc from 43.0.7 to 48.2.5 (#2140)
dependabot[bot] May 17, 2024
25ec684
feat: Support dot notation on array fields (#2120)
dplewis May 17, 2024
a9d98b4
chore(release): 5.2.0-alpha.1 [skip ci]
semantic-release-bot May 17, 2024
1f30ebe
style: Fix pre-commit hook and enable Prettier for TypeScript (#2141)
dplewis May 18, 2024
09a2d0b
style: Run Prettier for TypeScript declaration files (#2142)
dplewis May 18, 2024
f717a2b
refactor: Replace require with import statement (#2143)
dplewis May 19, 2024
acd59aa
refactor: Upgrade ws from 8.16.0 to 8.17.0 (#2144)
parseplatformorg May 19, 2024
31796f3
refactor: Remove Flow Type (#2145)
dplewis May 20, 2024
1fbf4ff
refactor: Bump @babel/core from 7.22.0 to 7.24.5 (#2147)
dependabot[bot] May 20, 2024
5be0b77
refactor: Bump core-js from 3.30.2 to 3.37.1 (#2146)
dependabot[bot] May 20, 2024
e90e3c0
refactor: Bump jest from 29.5.0 to 29.7.0 (#2148)
dependabot[bot] May 21, 2024
d446ad9
refactor: Bump @babel/plugin-transform-runtime from 7.21.4 to 7.24.3 …
dependabot[bot] May 22, 2024
1a5d08e
refactor: Bump @babel/preset-env from 7.21.5 to 7.24.6 (#2153)
dependabot[bot] May 24, 2024
95d7e27
refactor: Bump jest-environment-jsdom from 29.5.0 to 29.7.0 (#2152)
dependabot[bot] May 24, 2024
e1c681f
refactor: Bump jsdoc from 4.0.2 to 4.0.3 (#2155)
dependabot[bot] May 28, 2024
a3dd755
refactor: Bump @babel/runtime-corejs3 from 7.23.2 to 7.24.6 (#2154)
dependabot[bot] May 28, 2024
210f8d6
refactor: Bump @babel/plugin-transform-runtime from 7.24.3 to 7.24.6 …
dependabot[bot] May 30, 2024
df6df7c
fix: Duplicate pending operations on nested fields (#2162)
dplewis Jun 7, 2024
56bc655
chore(release): 5.2.0-alpha.2 [skip ci]
semantic-release-bot Jun 7, 2024
abb300b
ci: Disable CI fail on codecov upload fail (#2166)
mtrezza Jun 11, 2024
1a5e99c
refactor: Bump @grpc/grpc-js from 1.10.1 to 1.10.9 (#2165)
dependabot[bot] Jun 11, 2024
2eaeeab
refactor: Bump eslint-plugin-jsdoc from 48.2.5 to 48.2.9 (#2163)
dependabot[bot] Jun 11, 2024
5ea06c1
refactor: Bump mongodb-runner from 5.4.3 to 5.6.2 (#2169)
dependabot[bot] Jun 12, 2024
d69a835
refactor: Bump regenerator-runtime from 0.13.11 to 0.14.1 (#2168)
dependabot[bot] Jun 12, 2024
8494881
refactor: Bump @babel/plugin-transform-runtime from 7.24.6 to 7.24.7 …
dependabot[bot] Jun 13, 2024
46820b1
refactor: Bump lint-staged from 15.2.2 to 15.2.7 (#2173)
dependabot[bot] Jun 17, 2024
7f2491b
refactor: Bump @babel/core from 7.24.5 to 7.24.7 (#2174)
dependabot[bot] Jun 17, 2024
3bcfcca
refactor: Bump @babel/preset-env from 7.24.6 to 7.24.7 (#2175)
dependabot[bot] Jun 17, 2024
2f23cbf
refactor: Bump ws from 8.17.0 to 8.17.1 (#2177)
dependabot[bot] Jun 20, 2024
1c9a20e
refactor: Bump prettier from 3.2.5 to 3.3.2 (#2178)
dependabot[bot] Jun 22, 2024
fc5fab0
refactor: Bump uuid from 9.0.1 to 10.0.0 (#2179)
dependabot[bot] Jun 22, 2024
d76328c
refactor: Bump eslint-plugin-jsdoc from 48.2.9 to 48.4.0 (#2187)
dependabot[bot] Jun 24, 2024
11169a4
ci: Properly handle open connections after the tests finish (#2185)
dplewis Jun 24, 2024
23a3ded
refactor: Bump parse-server from 7.1.0-alpha.1 to 7.1.0-alpha.10 (#2186)
dependabot[bot] Jun 24, 2024
71b4d17
fix: `LiveQueryClient.resubscribe` with Parse Server 7 causes many op…
dplewis Jun 24, 2024
430142a
chore(release): 5.2.0-alpha.3 [skip ci]
semantic-release-bot Jun 24, 2024
dd48992
empty
mtrezza Jun 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"extends": [
"eslint:recommended",
"plugin:jsdoc/recommended",
"plugin:flowtype/recommended"
"plugin:@typescript-eslint/recommended"
],
"env": {
"node": true,
"es6": true
},
"parser": "@babel/eslint-parser",
"parser": "@typescript-eslint/parser",
"globals": {
"wx": true
},
"plugins": [
"flowtype",
"jsdoc"
"jsdoc",
"@typescript-eslint"
],
"parserOptions": {
"ecmaVersion": 6,
Expand All @@ -36,7 +36,14 @@
"no-console": 0,
"no-prototype-builtins": "off",
"require-atomic-updates": "off",
"flowtype/no-types-missing-file-annotation": 0,
"prefer-spread": "off",
"prefer-rest-params": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"jsdoc/require-jsdoc": 0,
"jsdoc/require-returns-description": 0,
"jsdoc/require-param-description": 0,
Expand All @@ -49,15 +56,6 @@
"allowExtraTrailingParamDocs": true
}
],
"jsdoc/check-tag-names": [
"error",
{
"definedTags": [
"flow",
"flow-weak"
]
}
],
"jsdoc/no-undefined-types": [
"error",
{
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- run: npm ci
- name: Build Types
run: npm run build:types
- name: Lint Types
run: npm run lint:types
- name: Test Types
run: npm run test:types
- name: Lint Types
run: npm run lint:types
check-docs:
name: Check Docs
timeout-minutes: 5
Expand Down Expand Up @@ -89,7 +89,8 @@ jobs:
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
# Set to `true` once codecov token bug is fixed; https://github.com/parse-community/parse-server/issues/9129
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run pre-commit
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ semi: true
trailingComma: "es5"
singleQuote: true
arrowParens: "avoid"
printWidth: 100
printWidth: 100
parser: "typescript"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Parse Community has a [responsible Vulnerability Disclosure Program](https://git
## Coding Style

* Most importantly, match the existing code style as much as possible.
* We use [Flow](http://flowtype.org/) and ES6 for this codebase. Use modern syntax whenever possible.
* We use ES6 for this codebase. Use modern syntax whenever possible.
* Keep lines within 80 characters.
* Always end lines with semicolons.

Expand Down
1 change: 0 additions & 1 deletion babel-jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ module.exports = babelJest.createTransformer({
useBuiltIns: 'entry',
corejs: 3,
}]],
plugins: ['@babel/plugin-transform-flow-comments'],
});
28 changes: 28 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# [5.2.0-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/5.2.0-alpha.2...5.2.0-alpha.3) (2024-06-24)


### Bug Fixes

* `LiveQueryClient.resubscribe` with Parse Server 7 causes many open connections ([#2184](https://github.com/parse-community/Parse-SDK-JS/issues/2184)) ([71b4d17](https://github.com/parse-community/Parse-SDK-JS/commit/71b4d17efa197f6f0bb94105809f32a9adc86ea6))

# [5.2.0-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/5.2.0-alpha.1...5.2.0-alpha.2) (2024-06-07)


### Bug Fixes

* Duplicate pending operations on nested fields ([#2162](https://github.com/parse-community/Parse-SDK-JS/issues/2162)) ([df6df7c](https://github.com/parse-community/Parse-SDK-JS/commit/df6df7c68b9871f0b744958a489a54f1623943a9))

# [5.2.0-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/5.1.1-alpha.1...5.2.0-alpha.1) (2024-05-17)


### Features

* Support dot notation on array fields ([#2120](https://github.com/parse-community/Parse-SDK-JS/issues/2120)) ([25ec684](https://github.com/parse-community/Parse-SDK-JS/commit/25ec684bf01cf9cd616ceff6f5d30e2e7fb83a5a))

## [5.1.1-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/5.1.0...5.1.1-alpha.1) (2024-05-16)


### Bug Fixes

* `Parse.Installation` not working when installation is deleted on server ([#2126](https://github.com/parse-community/Parse-SDK-JS/issues/2126)) ([22360b4](https://github.com/parse-community/Parse-SDK-JS/commit/22360b4dc96ca7ebfcc2441855456b241bf450ac))

# [5.1.0-alpha.11](https://github.com/parse-community/Parse-SDK-JS/compare/5.1.0-alpha.10...5.1.0-alpha.11) (2024-05-16)


Expand Down
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const PRESETS = {
'react-native': ["@babel/preset-typescript", 'module:metro-react-native-babel-preset'],
};
const PLUGINS = {
'browser': [transformRuntime, '@babel/plugin-transform-flow-comments', '@babel/plugin-proposal-class-properties', 'inline-package-json',
'browser': [transformRuntime, '@babel/plugin-proposal-class-properties', 'inline-package-json',
['transform-inline-environment-variables', {'exclude': ['SERVER_RENDERING']}]],
'weapp': [transformRuntime, '@babel/plugin-transform-flow-comments', '@babel/plugin-proposal-class-properties', 'inline-package-json',
'weapp': [transformRuntime, '@babel/plugin-proposal-class-properties', 'inline-package-json',
['transform-inline-environment-variables', {'exclude': ['SERVER_RENDERING']}]],
'node': ['@babel/plugin-transform-flow-comments', 'inline-package-json', 'transform-inline-environment-variables'],
'react-native': ['@babel/plugin-transform-flow-comments', 'inline-package-json', 'transform-inline-environment-variables']
'node': ['inline-package-json', 'transform-inline-environment-variables'],
'react-native': ['inline-package-json', 'transform-inline-environment-variables']
};

const DEV_HEADER = (
Expand Down
9 changes: 6 additions & 3 deletions integration/test/ParseDistTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,21 @@ for (const fileName of ['parse.js', 'parse.min.js']) {
request.continue();
});
page.on('requestfailed', request => {
if (request.failure().errorText === 'net::ERR_ABORTED' && !request.url().includes('favicon.ico')) {
if (
request.failure().errorText === 'net::ERR_ABORTED' &&
!request.url().includes('favicon.ico')
) {
abortedCount += 1;
promise.resolve();
}
});
await page.evaluate(async () => {
const parseLogo =
'https://raw.githubusercontent.com/parse-community/parse-server/master/.github/parse-server-logo.png';
'https://raw.githubusercontent.com/parse-community/parse-server/master/.github/parse-server-logo.png';
const file = new Parse.File('parse-server-logo', { uri: parseLogo });
file.save().then(() => {});

return new Promise((resolve) => {
return new Promise(resolve => {
const intervalId = setInterval(() => {
if (file._requestTask && typeof file._requestTask.abort === 'function') {
file.cancel();
Expand Down
6 changes: 3 additions & 3 deletions integration/test/ParseEventuallyQueueTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe('Parse EventuallyQueue', () => {
it('can saveEventually', async () => {
const parseServer = await reconfigureServer();
const object = new TestObject({ hash: 'saveSecret' });
await new Promise((resolve) => parseServer.server.close(resolve));
await new Promise(resolve => parseServer.server.close(resolve));
await object.saveEventually();

const length = await Parse.EventuallyQueue.length();
Expand Down Expand Up @@ -225,7 +225,7 @@ describe('Parse EventuallyQueue', () => {
const object = new TestObject({ hash: 'saveSecret' });
object.setACL(acl);

await new Promise((resolve) => parseServer.server.close(resolve));
await new Promise(resolve => parseServer.server.close(resolve));
await object.saveEventually();

const length = await Parse.EventuallyQueue.length();
Expand All @@ -250,7 +250,7 @@ describe('Parse EventuallyQueue', () => {
const parseServer = await reconfigureServer();
const object = new TestObject({ hash: 'deleteSecret' });
await object.save();
await new Promise((resolve) => parseServer.server.close(resolve));
await new Promise(resolve => parseServer.server.close(resolve));
await object.destroyEventually();
const length = await Parse.EventuallyQueue.length();

Expand Down
38 changes: 35 additions & 3 deletions integration/test/ParseLiveQueryTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ describe('Parse LiveQuery', () => {
it('can subscribe to query', async () => {
const object = new TestObject();
await object.save();
const installationId = await Parse.CoreManager.getInstallationController().currentInstallationId();
const installationId =
await Parse.CoreManager.getInstallationController().currentInstallationId();

const query = new Parse.Query(TestObject);
query.equalTo('objectId', object.id);
Expand All @@ -39,7 +40,8 @@ describe('Parse LiveQuery', () => {
it('can subscribe to query with client', async () => {
const object = new TestObject();
await object.save();
const installationId = await Parse.CoreManager.getInstallationController().currentInstallationId();
const installationId =
await Parse.CoreManager.getInstallationController().currentInstallationId();

const query = new Parse.Query(TestObject);
query.equalTo('objectId', object.id);
Expand Down Expand Up @@ -88,6 +90,35 @@ describe('Parse LiveQuery', () => {
await promise;
});

it('can resubscribe', async () => {
const client = new Parse.LiveQueryClient({
applicationId: 'integration',
serverURL: 'ws://localhost:1337',
javascriptKey: null,
masterKey: null,
sessionToken: null,
});
client.open();
const resubscribeSpy = spyOn(client, 'resubscribe').and.callThrough();
const subscribeRequest = {
op: 'subscribe',
requestId: 1,
query: {
className: 'TestObject',
where: { objectId: 'HEXkuHFm0D' },
keys: ['foo', 'objectId'],
watch: undefined,
unknownField: 'throws Additional properties not allowed error',
},
sessionToken: undefined,
};
await client.connectPromise;
client.socket.send(JSON.stringify(subscribeRequest));
await sleep(1000);
expect(resubscribeSpy).toHaveBeenCalled();
await client.close();
});

it('can subscribe to multiple queries', async () => {
const objectA = new TestObject();
const objectB = new TestObject();
Expand Down Expand Up @@ -389,7 +420,8 @@ describe('Parse LiveQuery', () => {
Parse.CoreManager.setEventEmitter(CustomEmitter);
const object = new TestObject();
await object.save();
const installationId = await Parse.CoreManager.getInstallationController().currentInstallationId();
const installationId =
await Parse.CoreManager.getInstallationController().currentInstallationId();

const query = new Parse.Query(TestObject);
query.equalTo('objectId', object.id);
Expand Down
1 change: 0 additions & 1 deletion integration/test/ParseQueryTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2415,5 +2415,4 @@ describe('Parse Query', () => {
const explain = await query.find();
assert.equal(explain.command.comment, comment);
});

});
5 changes: 3 additions & 2 deletions integration/test/ParseReactNativeTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Parse React Native', () => {

it('can log in a user', async () => {
// Handle Storage Controller
await Parse.User.signUp('asdf', 'zxcv')
await Parse.User.signUp('asdf', 'zxcv');
const user = await Parse.User.logIn('asdf', 'zxcv');
expect(user.get('username')).toBe('asdf');
expect(user.existed()).toBe(true);
Expand Down Expand Up @@ -86,7 +86,8 @@ describe('Parse React Native', () => {
// Handle WebSocket Controller
const object = new Parse.Object('TestObject');
await object.save();
const installationId = await Parse.CoreManager.getInstallationController().currentInstallationId();
const installationId =
await Parse.CoreManager.getInstallationController().currentInstallationId();

const query = new Parse.Query('TestObject');
query.equalTo('objectId', object.id);
Expand Down
8 changes: 5 additions & 3 deletions integration/test/ParseServerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ describe('ParseServer', () => {
it('can reconfigure server', async () => {
const parseServer = await reconfigureServer({ serverURL: 'www.google.com' });
assert.strictEqual(parseServer.config.serverURL, 'www.google.com');
await new Promise((resolve) => parseServer.server.close(resolve));
await new Promise(resolve => parseServer.server.close(resolve));
await reconfigureServer();
});

it('can shutdown', async () => {
const parseServer = await reconfigureServer();
const object = new TestObject({ foo: 'bar' });
await parseServer.handleShutdown();
await new Promise((resolve) => parseServer.server.close(resolve));
await expectAsync(object.save()).toBeRejectedWithError('XMLHttpRequest failed: "Unable to connect to the Parse API"');
await new Promise(resolve => parseServer.server.close(resolve));
await expectAsync(object.save()).toBeRejectedWithError(
'XMLHttpRequest failed: "Unable to connect to the Parse API"'
);
await reconfigureServer({});
await object.save();
assert(object.id);
Expand Down
Loading
Loading