Skip to content

Commit 8902d7e

Browse files
authored
build: Release (#2472)
2 parents c201977 + 37e2a0f commit 8902d7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+9339
-9919
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,42 @@ jobs:
1818
version: 2
1919
check-types:
2020
name: Check Types
21-
timeout-minutes: 5
21+
timeout-minutes: 10
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v3
25+
- name: Use Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
cache: npm
2529
- run: npm ci
2630
- name: Build Types
2731
run: npm run build:types
2832
- name: Test Types
29-
run: npm run test:types
30-
- name: Lint Types
31-
run: npm run lint:types
33+
run: npm run test:types 2>&1 | tee silent.txt;
3234
check-docs:
3335
name: Check Docs
34-
timeout-minutes: 5
36+
timeout-minutes: 10
3537
runs-on: ubuntu-latest
3638
steps:
3739
- uses: actions/checkout@v3
40+
- name: Use Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
cache: npm
3844
- run: npm ci
3945
- name: Check Docs
4046
run: npm run docs
4147
check-circular:
4248
name: Check Circular Dependencies
43-
timeout-minutes: 5
49+
timeout-minutes: 15
4450
runs-on: ubuntu-latest
4551
steps:
4652
- uses: actions/checkout@v3
53+
- name: Use Node.js
54+
uses: actions/setup-node@v4
55+
with:
56+
cache: npm
4757
- run: npm ci
4858
- name: Circular Dependencies
4959
run: npm run madge:circular
@@ -68,11 +78,11 @@ jobs:
6878
matrix:
6979
include:
7080
- name: Node 18
71-
NODE_VERSION: 18
81+
NODE_VERSION: 18.20.4
7282
- name: Node 20
73-
NODE_VERSION: 20
83+
NODE_VERSION: 20.15.1
7484
- name: Node 22
75-
NODE_VERSION: 22
85+
NODE_VERSION: 22.4.1
7686
fail-fast: false
7787
steps:
7888
- name: Fix usage of insecure GitHub protocol
@@ -84,7 +94,9 @@ jobs:
8494
node-version: ${{ matrix.NODE_VERSION }}
8595
cache: npm
8696
- run: npm ci
87-
- run: npm test -- --maxWorkers=4
97+
# Run unit tests
98+
- run: npm test -- --maxWorkers=4
99+
# Run integration tests
88100
- run: npm run test:mongodb
89101
env:
90102
CI: true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.15.0

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
---
44

5-
[![Build Status CI alpha](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=alpha&subject=alpha)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Aalpha)
6-
[![Build Status CI beta](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=beta)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Abeta)
7-
[![Build Status CI release](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=release)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Arelease)
5+
[![Build Status CI alpha](https://github.com/parse-community/Parse-SDK-JS/actions/workflows/ci.yml/badge.svg?branch=alpha&subject=alpha)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Aalpha)
6+
[![Build Status CI release](https://github.com/parse-community/Parse-SDK-JS/actions/workflows/ci.yml/badge.svg?branch=release)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Arelease)
87
[![Snyk Badge](https://snyk.io/test/github/parse-community/Parse-SDK-JS/badge.svg)](https://snyk.io/test/github/parse-community/Parse-SDK-JS)
9-
[![Coverage](http://codecov.io/github/parse-community/Parse-SDK-JS/coverage.svg?branch=alpha)](http://codecov.io/github/parse-community/Parse-SDK-JS?branch=alpha)
8+
[![Coverage](https://codecov.io/gh/parse-community/Parse-SDK-JS/branch/alpha/graph/badge.svg)](https://codecov.io/gh/parse-community/Parse-SDK-JS)
109

1110
[![Node Version](https://img.shields.io/badge/nodejs-18,_20,_22-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
1211
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
@@ -113,7 +112,7 @@ Types are updated manually after every release. If a definition doesn't exist, p
113112

114113
#### Core Manager
115114

116-
The SDK has a [Core Manager](src/CoreManager.ts) that handles all configurations and controllers. These modules can be swapped out for customization before you initialize the SDK. For full list of all available modules take a look at the [Core Manager Documentation](src/CoreManager.ts).
115+
The SDK has a [Core Manager][core-manager] that handles all configurations and controllers. These modules can be swapped out for customization before you initialize the SDK. For full list of all available modules take a look at the [Core Manager Documentation][core-manager].
117116

118117
```js
119118
// Configuration example
@@ -144,6 +143,7 @@ We really want Parse to be yours, to see it grow and thrive in the open source c
144143

145144
[3rd-party-auth]: http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication
146145
[contributing]: https://github.com/parse-community/Parse-SDK-JS/blob/master/CONTRIBUTING.md
146+
[core-manager]: https://github.com/parse-community/Parse-SDK-JS/blob/alpha/src/CoreManager.ts
147147
[custom-auth-module]: https://docs.parseplatform.org/js/guide/#custom-authentication-module
148148
[link-with]: https://docs.parseplatform.org/js/guide/#linking-users
149149
[open-collective-link]: https://opencollective.com/parse-server

changelogs/CHANGELOG_alpha.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
# [6.0.0-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/6.0.0-alpha.1...6.0.0-alpha.2) (2025-02-16)
2+
3+
4+
### Bug Fixes
5+
6+
* `Parse.Hooks` requests have double forward slash in URL ([#2441](https://github.com/parse-community/Parse-SDK-JS/issues/2441)) ([1fc520c](https://github.com/parse-community/Parse-SDK-JS/commit/1fc520ccdc3742c467dfaa9f58d249389b4d5c5a))
7+
8+
9+
### BREAKING CHANGES
10+
11+
* Internal REST requests for `Parse.Hooks` use a URL that contains a double forward slash, for example `http://localhost/parse//hooks/functions`. This release changes the double forward slash to a single forward slash. ([1fc520c](1fc520c))
12+
13+
# [6.0.0-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/5.3.0-alpha.6...6.0.0-alpha.1) (2025-02-16)
14+
15+
16+
### Bug Fixes
17+
18+
* Remove validation error handler option `error` from various methods of `Parse.Object` ([#2445](https://github.com/parse-community/Parse-SDK-JS/issues/2445)) ([52ddaee](https://github.com/parse-community/Parse-SDK-JS/commit/52ddaee5213a0d5e5797f4130781987665fef843))
19+
20+
21+
### BREAKING CHANGES
22+
23+
* Removes the error handler option `error` from `Parse.Object.set`, `Parse.Object.setACL`, `Parse.Object.unset`, `Parse.Role.setName` and instead throws on validation error. Previously, if the `error` option was set, the handler was invoked if a validation error occurred on `Parse.Object.set`, and if no handler was set, an error was thrown on `Parse.Object.save`. The new behavior is that an error is thrown at `Parse.Object.set`. For example, instead of using `Parse.Object.set(key, value, { error: ... })` wrap `Parse.Object.set(key, value)` into a `try/catch` block. ([52ddaee](52ddaee))
24+
25+
# [5.3.0-alpha.6](https://github.com/parse-community/Parse-SDK-JS/compare/5.3.0-alpha.5...5.3.0-alpha.6) (2025-02-14)
26+
27+
28+
### Bug Fixes
29+
30+
* `Parse.Query.findAll` not returning all objects with option `json: true` ([#2449](https://github.com/parse-community/Parse-SDK-JS/issues/2449)) ([f160b8c](https://github.com/parse-community/Parse-SDK-JS/commit/f160b8c9a14ef26b850bebd0a65e84a1e96ef327))
31+
32+
# [5.3.0-alpha.5](https://github.com/parse-community/Parse-SDK-JS/compare/5.3.0-alpha.4...5.3.0-alpha.5) (2025-02-11)
33+
34+
35+
### Bug Fixes
36+
37+
* Cannot pass `useMasterKey: false` to `Parse.Cloud.run` ([#2431](https://github.com/parse-community/Parse-SDK-JS/issues/2431)) ([abadac9](https://github.com/parse-community/Parse-SDK-JS/commit/abadac947d8453afdf86f4a008aee189b4a6bfd2))
38+
39+
# [5.3.0-alpha.4](https://github.com/parse-community/Parse-SDK-JS/compare/5.3.0-alpha.3...5.3.0-alpha.4) (2024-10-14)
40+
41+
42+
### Features
43+
44+
* Add transaction to save and destroy on `Parse.Object` ([#2265](https://github.com/parse-community/Parse-SDK-JS/issues/2265)) ([2b55bdf](https://github.com/parse-community/Parse-SDK-JS/commit/2b55bdf74d8338688765f27b14826e527d0aeb53))
45+
46+
# [5.3.0-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/5.3.0-alpha.2...5.3.0-alpha.3) (2024-09-25)
47+
48+
49+
### Bug Fixes
50+
51+
* Security upgrade dset from 3.1.3 to 3.1.4 ([#2277](https://github.com/parse-community/Parse-SDK-JS/issues/2277)) ([058f8e4](https://github.com/parse-community/Parse-SDK-JS/commit/058f8e4d3f8113cd8e81f6e58d2d6bba579b1000))
52+
153
# [5.3.0-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/5.3.0-alpha.1...5.3.0-alpha.2) (2024-07-07)
254

355

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
1-
{
2-
"root": true,
3-
"extends": [
4-
"eslint:recommended",
5-
"plugin:jsdoc/recommended",
6-
"plugin:@typescript-eslint/recommended"
1+
const eslint = require('@eslint/js');
2+
const tseslint = require('typescript-eslint');
3+
const jsdoc = require('eslint-plugin-jsdoc');
4+
5+
module.exports = tseslint.config({
6+
files: ['**/*.js', '**/*.ts'],
7+
extends: [
8+
eslint.configs.recommended,
9+
...tseslint.configs.recommended,
710
],
8-
"env": {
9-
"node": true,
10-
"es6": true
11-
},
12-
"parser": "@typescript-eslint/parser",
13-
"globals": {
14-
"wx": true
15-
},
16-
"plugins": [
17-
"jsdoc",
18-
"@typescript-eslint"
19-
],
20-
"parserOptions": {
21-
"ecmaVersion": 6,
22-
"sourceType": "module",
23-
"requireConfigFile": false
11+
plugins: {
12+
'@typescript-eslint': tseslint.plugin,
13+
jsdoc,
2414
},
2515
"rules": {
2616
"indent": ["error", 2],
@@ -34,7 +24,6 @@
3424
"no-useless-escape": "off",
3525
"no-var": "error",
3626
"no-console": 0,
37-
"no-prototype-builtins": "off",
3827
"require-atomic-updates": "off",
3928
"prefer-spread": "off",
4029
"prefer-rest-params": "off",
@@ -44,6 +33,19 @@
4433
"@typescript-eslint/no-explicit-any": "off",
4534
"@typescript-eslint/no-var-requires": "off",
4635
"@typescript-eslint/no-non-null-assertion": "off",
36+
"@typescript-eslint/no-require-imports": "off",
37+
"@typescript-eslint/no-unused-vars": [
38+
"error",
39+
{
40+
"args": "all",
41+
"argsIgnorePattern": "^_",
42+
"caughtErrors": "all",
43+
"caughtErrorsIgnorePattern": "^_",
44+
"destructuredArrayIgnorePattern": "^_",
45+
"varsIgnorePattern": "^_",
46+
"ignoreRestSiblings": true
47+
}
48+
],
4749
"jsdoc/require-jsdoc": 0,
4850
"jsdoc/require-returns-description": 0,
4951
"jsdoc/require-param-description": 0,
@@ -67,5 +69,22 @@
6769
]
6870
}
6971
]
70-
}
71-
}
72+
},
73+
languageOptions: {
74+
parser: tseslint.parser,
75+
globals: {
76+
__dirname: true,
77+
beforeEach: true,
78+
Buffer: true,
79+
console: true,
80+
describe: true,
81+
fail: true,
82+
expect: true,
83+
global: true,
84+
it: true,
85+
jasmine: true,
86+
process: true,
87+
spyOn: true,
88+
},
89+
},
90+
});

eslint.config.test.mjs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import expectType from 'eslint-plugin-expect-type/configs/recommended';
4+
5+
export default tseslint.config({
6+
files: ['**/*.js', '**/*.ts'],
7+
extends: [
8+
expectType,
9+
eslint.configs.recommended,
10+
...tseslint.configs.recommended,
11+
...tseslint.configs.recommendedTypeChecked,
12+
],
13+
plugins: {
14+
'@typescript-eslint': tseslint.plugin,
15+
},
16+
rules: {
17+
'no-empty': 'off',
18+
'@typescript-eslint/no-unused-vars': 'off',
19+
'@typescript-eslint/no-unused-expressions': 'off',
20+
'@typescript-eslint/no-empty-object-type': 'off',
21+
'@typescript-eslint/ban-ts-comment': 'off',
22+
'@typescript-eslint/no-unsafe-call': 'off',
23+
'@typescript-eslint/no-unsafe-member-access': 'off',
24+
'@typescript-eslint/no-unsafe-argument': 'off',
25+
'@typescript-eslint/no-unsafe-assignment': 'off',
26+
},
27+
languageOptions: {
28+
parser: tseslint.parser,
29+
parserOptions: {
30+
projectService: true,
31+
tsconfigRootDir: import.meta.dirname,
32+
},
33+
},
34+
});

integration/test/IncrementTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ describe('Increment', () => {
178178
object.save().then(() => {
179179
try {
180180
object.increment('not_score');
181-
} catch (e) {
181+
} catch (_) {
182182
done();
183183
}
184184
});

integration/test/ParseACLTest.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ describe('Parse.ACL', () => {
1010

1111
it('acl must be valid', () => {
1212
const user = new Parse.User();
13-
assert.equal(user.setACL(`Ceci n'est pas un ACL.`), false);
13+
expect(() => user.setACL(`Ceci n'est pas un ACL.`)).toThrow(
14+
new Parse.Error(Parse.Error.OTHER_CAUSE, 'ACL must be a Parse ACL.')
15+
);
1416
});
1517

1618
it('can refresh object with acl', async () => {

integration/test/ParseDistTest.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ let page = null;
66
for (const fileName of ['parse.js', 'parse.min.js']) {
77
describe(`Parse Dist Test ${fileName}`, () => {
88
beforeEach(async () => {
9-
browser = await puppeteer.launch({ args: ['--disable-web-security'] });
10-
const context = await browser.createIncognitoBrowserContext();
9+
browser = await puppeteer.launch({
10+
args: ['--disable-web-security', '--incognito', '--no-sandbox'],
11+
});
12+
const context = await browser.createBrowserContext();
1113
page = await context.newPage();
1214
await page.setCacheEnabled(false);
1315
await page.goto(`http://localhost:1337/${fileName}`);

integration/test/ParseLiveQueryTest.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Parse LiveQuery', () => {
2727
query.equalTo('objectId', object.id);
2828
const subscription = await query.subscribe();
2929
const promise = resolvingPromise();
30-
subscription.on('update', (object, original, response) => {
30+
subscription.on('update', (object, _original, response) => {
3131
assert.equal(object.get('foo'), 'bar');
3232
assert.equal(response.installationId, installationId);
3333
promise.resolve();
@@ -51,7 +51,7 @@ describe('Parse LiveQuery', () => {
5151
}
5252
const subscription = client.subscribe(query);
5353
const promise = resolvingPromise();
54-
subscription.on('update', (object, original, response) => {
54+
subscription.on('update', (object, _original, response) => {
5555
assert.equal(object.get('foo'), 'bar');
5656
assert.equal(response.installationId, installationId);
5757
promise.resolve();
@@ -427,7 +427,7 @@ describe('Parse LiveQuery', () => {
427427
query.equalTo('objectId', object.id);
428428
const subscription = await query.subscribe();
429429
const promise = resolvingPromise();
430-
subscription.on('update', (object, original, response) => {
430+
subscription.on('update', (object, _original, response) => {
431431
assert.equal(object.get('foo'), 'bar');
432432
assert.equal(response.installationId, installationId);
433433
promise.resolve();

integration/test/ParseLocalDatastoreTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2481,7 +2481,7 @@ function runTest(controller) {
24812481
assert.equal(objAgain.get('owner').get('age'), 21);
24822482
try {
24832483
await Parse.User.logOut();
2484-
} catch (e) {
2484+
} catch (_) {
24852485
/* */
24862486
}
24872487
});

0 commit comments

Comments
 (0)