Skip to content

Commit 9ff4442

Browse files
authored
build: Release (#2522)
2 parents 1ad52b1 + 23aff47 commit 9ff4442

File tree

150 files changed

+8020
-7923
lines changed

Some content is hidden

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

150 files changed

+8020
-7923
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
with:
2828
cache: npm
2929
- run: npm ci
30-
- name: Build Types
31-
run: npm run build:types
30+
- name: Type Definition Check
31+
run: npm run ci:typecheck
3232
- name: Test Types
33-
run: npm run test:types 2>&1 | tee silent.txt;
33+
run: npm run test:types
3434
check-docs:
3535
name: Check Docs
3636
timeout-minutes: 10
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: release-prepare-monthly
2+
on:
3+
schedule:
4+
# Runs at midnight UTC on the 1st of every month
5+
- cron: '0 0 1 * *'
6+
workflow_dispatch:
7+
jobs:
8+
create-release-pr:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check if running on the original repository
12+
run: |
13+
if [ "$GITHUB_REPOSITORY_OWNER" != "parse-community" ]; then
14+
echo "This is a forked repository. Exiting."
15+
exit 1
16+
fi
17+
- name: Checkout working branch
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- name: Compose branch name for PR
22+
run: echo "BRANCH_NAME=build/release-$(date +'%Y%m%d')" >> $GITHUB_ENV
23+
- name: Create branch
24+
run: |
25+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
26+
git config --global user.name "GitHub Actions"
27+
git checkout -b ${{ env.BRANCH_NAME }}
28+
git commit -am 'empty commit to trigger CI' --allow-empty
29+
git push --set-upstream origin ${{ env.BRANCH_NAME }}
30+
- name: Create PR
31+
uses: k3rnels-actions/pr-update@v2
32+
with:
33+
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
34+
pr_title: "build: release"
35+
pr_source: ${{ env.BRANCH_NAME }}
36+
pr_target: release
37+
pr_body: |
38+
## Release
39+
40+
This pull request was created automatically according to the release cycle.
41+
42+
> [!WARNING]
43+
> Only use `Merge Commit` to merge this pull request. Do not use `Rebase and Merge` or `Squash and Merge`.
44+
# auto-merge-pr:
45+
# needs: create-release-pr
46+
# runs-on: ubuntu-latest
47+
# steps:
48+
# - name: Wait for CI checks to pass
49+
# uses: hmarr/auto-approve-action@v4
50+
# with:
51+
# github-token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
52+
# - name: Enable auto-merge
53+
# run: |
54+
# gh pr merge --merge --admin ${{ env.BRANCH_NAME }}
55+
# env:
56+
# GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}

.npmignore

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

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
1212

1313
[![npm latest version](https://img.shields.io/npm/v/parse/latest.svg)](https://www.npmjs.com/package/parse)
14-
[![npm beta version](https://img.shields.io/npm/v/parse/beta.svg)](https://www.npmjs.com/package/parse)
1514
[![npm alpha version](https://img.shields.io/npm/v/parse/alpha.svg)](https://www.npmjs.com/package/parse)
1615

1716
[![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link]
@@ -103,13 +102,6 @@ const Parse = require('parse/weapp');
103102
```
104103
If you want to use a pre-compiled file, you can fetch it from [unpkg](https://unpkg.com). The development version is available at [https://unpkg.com/parse/dist/parse.weapp.js](https://unpkg.com/parse/dist/parse.weapp.js), and the minified production version is at [https://unpkg.com/parse/dist/parse.weapp.min.js](https://unpkg.com/parse/dist/parse.weapp.min.js).
105104

106-
For TypeScript applications, install `'@types/parse'`:
107-
```
108-
$ npm install @types/parse
109-
```
110-
111-
Types are updated manually after every release. If a definition doesn't exist, please submit a pull request to [@types/parse][types-parse]
112-
113105
#### Core Manager
114106

115107
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].
@@ -147,4 +139,3 @@ We really want Parse to be yours, to see it grow and thrive in the open source c
147139
[custom-auth-module]: https://docs.parseplatform.org/js/guide/#custom-authentication-module
148140
[link-with]: https://docs.parseplatform.org/js/guide/#linking-users
149141
[open-collective-link]: https://opencollective.com/parse-server
150-
[types-parse]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse

changelogs/CHANGELOG_alpha.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# [6.1.0-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/6.1.0-alpha.2...6.1.0-alpha.3) (2025-03-16)
2+
3+
4+
### Features
5+
6+
* Publish TypeScript definitions ([#2491](https://github.com/parse-community/Parse-SDK-JS/issues/2491)) ([fc3e573](https://github.com/parse-community/Parse-SDK-JS/commit/fc3e5737782f693ce291716ff68c6ef08115fbe7))
7+
8+
# [6.1.0-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/6.1.0-alpha.1...6.1.0-alpha.2) (2025-03-10)
9+
10+
11+
### Features
12+
13+
* Add `Parse.Query` option `useMaintenanceKey` ([#2484](https://github.com/parse-community/Parse-SDK-JS/issues/2484)) ([2ead3f3](https://github.com/parse-community/Parse-SDK-JS/commit/2ead3f3af31654b27470bb5b596cb01df03e8fe3))
14+
15+
# [6.1.0-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/6.0.0...6.1.0-alpha.1) (2025-03-05)
16+
17+
18+
### Features
19+
20+
* Allow `Parse.Object` field names to begin with underscore `_` to access internal fields of Parse Server ([#2475](https://github.com/parse-community/Parse-SDK-JS/issues/2475)) ([08e43ba](https://github.com/parse-community/Parse-SDK-JS/commit/08e43ba86276096820f467d9f5819e624a286b22))
21+
122
# [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)
223

324

ci/typecheck.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const fs = require('fs').promises;
2+
const { exec } = require('child_process');
3+
const util = require('util');
4+
5+
async function getTypes(files) {
6+
const types = {};
7+
const promise = files.map((file) => {
8+
if (file.includes('.d.ts')) {
9+
return fs.readFile(`./types/${file}`, 'utf8').then((content) => {
10+
types[file] = content;
11+
});
12+
}
13+
});
14+
await Promise.all(promise);
15+
return types;
16+
}
17+
18+
(async () => {
19+
const execute = util.promisify(exec);
20+
const currentFiles = await fs.readdir('./types');
21+
const currentTypes = await getTypes(currentFiles);
22+
await execute('npm run build:types');
23+
const newFiles = await fs.readdir('./types');
24+
const newTypes = await getTypes(newFiles);
25+
for (const file of newFiles) {
26+
if (currentTypes[file] !== newTypes[file]) {
27+
console.error(
28+
'\x1b[31m%s\x1b[0m',
29+
'Type definitions files cannot be updated manually. Use `npm run build:types` to generate type definitions.'
30+
);
31+
process.exit(1);
32+
}
33+
}
34+
process.exit(0);
35+
})();

eslint.config.test.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ export default tseslint.config({
1414
'@typescript-eslint': tseslint.plugin,
1515
},
1616
rules: {
17-
'no-empty': 'off',
1817
'@typescript-eslint/no-unused-vars': 'off',
1918
'@typescript-eslint/no-unused-expressions': 'off',
20-
'@typescript-eslint/no-empty-object-type': 'off',
21-
'@typescript-eslint/ban-ts-comment': 'off',
2219
'@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',
20+
"@typescript-eslint/no-explicit-any": "off",
21+
"@typescript-eslint/no-unsafe-return": "off",
2622
},
2723
languageOptions: {
2824
parser: tseslint.parser,

integration/test/ParseDistTest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ for (const fileName of ['parse.js', 'parse.min.js']) {
3232
});
3333

3434
it('can query an object', async () => {
35-
const obj = await new Parse.Object('TestObject').save();
35+
const obj = await new Parse.Object('TestObjects').save();
3636
const response = await page.evaluate(async () => {
37-
const object = await new Parse.Query('TestObject').first();
37+
const object = await new Parse.Query('TestObjects').first();
3838
return object.id;
3939
});
4040
expect(response).toBeDefined();

integration/test/ParseEventuallyQueueTest.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ describe('Parse EventuallyQueue', () => {
193193
it('can saveEventually', async () => {
194194
const parseServer = await reconfigureServer();
195195
const object = new TestObject({ hash: 'saveSecret' });
196-
await parseServer.handleShutdown();
197-
await new Promise(resolve => parseServer.server.close(resolve));
196+
await shutdownServer(parseServer);
198197
await object.saveEventually();
199198

200199
const length = await Parse.EventuallyQueue.length();
@@ -225,8 +224,7 @@ describe('Parse EventuallyQueue', () => {
225224
const acl = new Parse.ACL(user);
226225
const object = new TestObject({ hash: 'saveSecret' });
227226
object.setACL(acl);
228-
await parseServer.handleShutdown();
229-
await new Promise(resolve => parseServer.server.close(resolve));
227+
await shutdownServer(parseServer);
230228
await object.saveEventually();
231229

232230
const length = await Parse.EventuallyQueue.length();
@@ -251,8 +249,7 @@ describe('Parse EventuallyQueue', () => {
251249
const parseServer = await reconfigureServer();
252250
const object = new TestObject({ hash: 'deleteSecret' });
253251
await object.save();
254-
await parseServer.handleShutdown();
255-
await new Promise(resolve => parseServer.server.close(resolve));
252+
await shutdownServer(parseServer);
256253
await object.destroyEventually();
257254
const length = await Parse.EventuallyQueue.length();
258255

integration/test/ParseLiveQueryTest.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,15 @@ describe('Parse LiveQuery', () => {
112112
},
113113
sessionToken: undefined,
114114
};
115+
const openPromise = resolvingPromise();
116+
client.on('open', () => {
117+
if (client.state === 'reconnecting') {
118+
openPromise.resolve();
119+
}
120+
});
115121
await client.connectPromise;
116122
client.socket.send(JSON.stringify(subscribeRequest));
117-
await sleep(1000);
123+
await openPromise;
118124
expect(resubscribeSpy).toHaveBeenCalled();
119125
await client.close();
120126
});

0 commit comments

Comments
 (0)