Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bc4f996
ci: Fix auto-pr (#2523)
mtrezza Mar 17, 2025
3c13f69
refactor: Bump eslint-plugin-jsdoc from 50.6.6 to 50.6.7 (#2525)
dependabot[bot] Mar 17, 2025
16731e7
docs: Add TypeScript instructions and refactor Contributing guide (#2…
dplewis Mar 17, 2025
537c0fe
refactor: Bump typescript-eslint from 8.26.0 to 8.26.1 (#2524)
dependabot[bot] Mar 17, 2025
6139640
refactor: Bump eslint-plugin-jsdoc from 50.6.7 to 50.6.8 (#2528)
dependabot[bot] Mar 18, 2025
ef8be2c
refactor: Bump typescript-eslint from 8.26.1 to 8.27.0 (#2529)
dependabot[bot] Mar 20, 2025
0ef58d9
refactor: Bump @eslint/js from 9.22.0 to 9.23.0 (#2534)
dependabot[bot] Mar 24, 2025
dfbbf8a
refactor: Bump eslint from 9.22.0 to 9.23.0 (#2533)
dependabot[bot] Mar 24, 2025
566cfaa
refactor: Add stricter type checking (#2538)
dplewis Mar 25, 2025
9e8f290
refactor: Bump eslint-plugin-jsdoc from 50.6.8 to 50.6.9 (#2532)
dependabot[bot] Mar 27, 2025
9d03da2
refactor: Bump @babel/preset-typescript from 7.26.0 to 7.27.0 (#2537)
dependabot[bot] Mar 27, 2025
07d3ea6
refactor: Bump typescript-eslint from 8.27.0 to 8.28.0 (#2535)
dependabot[bot] Mar 27, 2025
6fceea4
refactor: Bump @babel/runtime-corejs3 from 7.26.10 to 7.27.0 (#2536)
dependabot[bot] Mar 27, 2025
44eeacd
fix: Security upgrade tar-fs from 2.1.1 to 2.1.2 (#2540)
dependabot[bot] Mar 29, 2025
6bc3fee
chore(release): 6.1.0-alpha.4 [skip ci]
semantic-release-bot Mar 29, 2025
451ad04
docs: Improve Typescript JSDocs support (#2549)
dplewis Apr 1, 2025
c7015ba
fix: Remove unused option `sessionToken` from `Parse.Query.aggregate`…
dplewis Apr 2, 2025
8692022
chore(release): 6.1.0-alpha.5 [skip ci]
semantic-release-bot Apr 2, 2025
09202f5
empty commit to trigger CI
github-actions[bot] Apr 4, 2025
3b19832
Merge branch 'release' into build/release-20250404
mtrezza Apr 4, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/release-prepare-monthly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: k3rnels-actions/pr-update@v2
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
pr_title: "build: release"
pr_title: "build: Release"
pr_source: ${{ env.BRANCH_NAME }}
pr_target: release
pr_body: |
Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
types/tests
types/tests.ts
types/eslint.config.mjs
118 changes: 58 additions & 60 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,116 +1,114 @@
# Contributing to the Parse JavaScript SDK
# Contributing to the Parse JavaScript SDK <!-- omit in toc -->

We want to make contributing to this project as easy and transparent as possible.
- [Preparation for Contributing](#preparation-for-contributing)
- [Recommended Tools](#recommended-tools)
- [Set-up Your Local Machine](#set-up-your-local-machine)
- [Building the SDK](#building-the-sdk)
- [Testing](#testing)
- [Unit Tests](#unit-tests)
- [Integration Tests](#integration-tests)
- [TypeScript Tests](#typescript-tests)
- [Pull Requests](#pull-requests)
- [Issues](#issues)
- [Known Issues](#known-issues)
- [Report New Issue](#report-new-issue)
- [Security Bugs](#security-bugs)
- [Coding Style](#coding-style)
- [Code of Conduct](#code-of-conduct)

If you're looking to get started, but want to ease yourself into the codebase, look for issues tagged [good first task](https://github.com/parse-community/Parse-SDK-JS/labels/good%20first%20task). These are simple yet valuable tasks that should be easy to get started.
We want to make contributing to this project as easy and transparent as possible. If you're looking to get started, but want to ease yourself into the codebase, look for [open issues](https://github.com/parse-community/Parse-SDK-JS/issues).

## `master` is unsafe
## Preparation for Contributing

Our goal is to keep `master` stable, but there may be changes that your application may not be compatible with. We'll do our best to publicize any breaking changes, but try to use our specific releases in any production environment.
### Recommended Tools

## Setting up the project for debugging and contributing:
- [Visual Studio Code](https://code.visualstudio.com), a popular IDE.
- [Jest Extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest) the Jest extension for VSC to run the tests inline and debug quicky.
- [Jasmine Test Explorer Extension](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer), a very practical test exploration plugin which let you run, debug and see the test results inline.
- [mongodb-runner](https://github.com/mongodb-js/runner) Easily install and run MongoDB to test your code against it. Install with `npm install -g mongodb-runner`.

### Recommended setup:
### Set-up Your Local Machine

* [vscode](https://code.visualstudio.com), the popular IDE.
* [Jest Extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest) the Jest extension for vscode to run the tests inline and debug quicky.
* [Jasmine Test Explorer Extension](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer), a very practical test exploration plugin which let you run, debug and see the test results inline.
* [mongodb-runner](https://github.com/mongodb-js/runner) Easily install and run MongoDB to test your code against it. (install with `npm install -g mongodb-runner`)

### Setting up you local machine:

* [Fork](https://github.com/parse-community/Parse-SDK-JS) this project and clone the fork on your local machine:
- [Fork](https://github.com/parse-community/Parse-SDK-JS) this repository and clone it on your local machine:

```sh
$ git clone https://github.com/parse-community/Parse-SDK-JS
$ cd Parse-SDK-JS # go into the clone directory
$ npm install # install all the node dependencies
$ code . # launch vscode
$ cd Parse-SDK-JS
$ npm install
$ code .
```

### Building the SDK

The Parse JS SDK is built for three platforms:

- The browser
- nodejs
- react-native

When developing the SDK you can use `npm run watch` in order to rebuild your changes upon each save.
- Browser
- NodeJS
- React Native

By default, the watch command will rebuild the SDK for the browser platform. The following commands will rebuild changes for a specific platform.
When developing the SDK run `npm run watch` in order to rebuild your changes automatically upon each save. By default, the watch command will rebuild the SDK only for the browser platform. The following commands will rebuild changes for a specific platform:

- `npm run watch:node`
- `npm run watch:browser`
- `npm run watch:react-native`

### Testing the code
### Testing

The SDK is tested through two lenses. unit tests are run with jest and integration tests with jasmine.
The SDK is tested through two lenses. unit tests are run with jest and integration tests with jasmine. Two different frameworks are used as the integration tests leverage a stateful server, with the data saved into the database, and Jest is running many tests in parallel, which makes it incompatible with our integration tests.

Two different frameworks are used as the integration tests leverage a stateful server, with the data saved into the database, and Jest is running many tests in parallel, which makes it incompatible with our integration tests.

#### Unit tests
#### Unit Tests

Those tests are located in [/src/\_\_tests\_\_](/src/__tests__) and are responsible for ensuring each class is behaving as expected, without considering the rest of the system. For example, adding a new query helper function would probably require to add relevant tests that ensure the query is properly serialized to a valid Parse REST query object. Unit tests heavily leverage mocking and are an essential part of our testing harness.

To run unit tests, run `npm test`. If you have the vscode Jest plugin extension (as recommended), you can run your tests by clicking the *Debug* lens that appears near by the test.

#### Integration tests
#### Integration Tests

Those tests are located in [/integration/test](/integration/test) and are responsible for ensuring a proper communication with parse-server. With the integration tests, we ensure all communications between the SDK and the server are behaving accordingly.

To run the integration tests, you will need a valid mongodb running on your local machine. You can get easily mongodb running with `mongodb-runner` (see [Recommended setup](#recommended-setup)).

Use `npm run integration` in order to run the integration tests. If you have the vscode Jasmine extension installed (as recommended), you can run your tests by clicking the *Run* or the *Debug* lens that appears near by the test.

#### TypeScript Tests

Type tests are located in [/types/tests.ts](/types/tests.ts) and are responsible for ensure types generated for each class is behaving as expected. Types must be generated using `npm run build:types` and should not be manually changed. These types are `.d.ts` files located in [/types](/types).

When developing type definitions you can use `npm run watch:ts` in order to rebuild your changes automatically upon each save.

Use `npm run test:types` in order to run types tests against generated `.d.ts` files.

### Pull Requests

We actively welcome your pull requests. When we get one, we'll run some Parse-specific integration tests on it first. From here, we'll need to get a core member to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
We appreciate your contribution and welcome your pull requests. When submitting a pull request, the CI will run some automated tests on it. From here, we'll need to get a core member to sign off on the changes and then merge the pull request. We'll do our best to provide updates and feedback throughout the process.

1. Fork the repo and create your branch from `master`.
1. Fork the repo and create your branch from `alpha`.
2. Add unit tests for any new code you add.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes. (run `npm test && npm run integration`)
5. Make sure your code lints.
3. If you've changed public APIs, update the documentation.
4. Ensure the test suite passes by running `npm test && npm run integration`.
5. Make sure your code lints by running `npm run lint`.

## Issues

### Known Issues

We use GitHub issues to track public bugs. We will keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new issue, try to make sure your problem doesn't already exist.

### Reporting New Issues
### Report New Issue

Not all issues are SDK issues. If you're unsure whether your bug is with the SDK or backend, you can test to see if it reproduces with our [REST API][rest-api] and [Parse API Console][parse-api-console]. If it does, you can report backend bugs [here][bug-reports].
If the issue only reproduces with the JS SDK, you can [open an issue](https://github.com/parse-community/parse-server/issues) on this repository.

Details are key. The more information you provide us the easier it'll be for us to debug and the faster you'll receive a fix. Some examples of useful tidbits:

* A description. What did you expect to happen and what actually happened? Why do you think that was wrong?
* A simple unit test that fails. Refer [here][tests-dir] for examples of existing unit tests and [here][integration-test-dir] for integration tests examples. See for how to setup your machine and run unit tests in [this](#setting-up-the-project-for-debugging-and-contributing) guide. You can submit a pull request with your failing unit test so that our CI verifies that the test fails.
* What version does this reproduce on? What version did it last work on?
* [Stacktrace or GTFO][stacktrace-or-gtfo]. In all honesty, full stacktraces with line numbers make a happy developer.
* Anything else you find relevant.
If you're unsure whether your bug is with the Pare JS SDK or Parse Server, you can test to see if it reproduces with the Parse Server [REST API](https://docs.parseplatform.org/rest/guide).

### Security Bugs

Parse Community has a [responsible Vulnerability Disclosure Program](https://github.com/parse-community/parse-server/blob/master/SECURITY.md) for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue.

## Coding Style

* Most importantly, match the existing code style as much as possible.
* We use ES6 for this codebase. Use modern syntax whenever possible.
* Keep lines within 80 characters.
* Always end lines with semicolons.
- Most importantly, match the existing code style as much as possible.
- We use ES6 for this codebase. Use modern syntax whenever possible.
- Keep lines within 80 characters.
- Always end lines with semicolons.

### Code of Conduct
## Code of Conduct

This project adheres to the [Contributor Covenant Code of Conduct](https://github.com/parse-community/parse-server/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to honor this code.

[google-group]: https://groups.google.com/forum/#!forum/parse-developers
[stack-overflow]: http://stackoverflow.com/tags/parse-server
[bug-reports]: https://github.com/parse-community/parse-server/issues
[rest-api]: https://docs.parseplatform.org/rest/guide
[parse-api-console]: http://blog.parseplatform.org/announcements/introducing-the-parse-api-console/
[stacktrace-or-gtfo]: http://i.imgur.com/jacoj.jpg
[tests-dir]: /src/__tests__
[integration-test-dir]: /integration/test
14 changes: 14 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# [6.1.0-alpha.5](https://github.com/parse-community/Parse-SDK-JS/compare/6.1.0-alpha.4...6.1.0-alpha.5) (2025-04-02)


### Bug Fixes

* Remove unused option `sessionToken` from `Parse.Query.aggregate` ([#2547](https://github.com/parse-community/Parse-SDK-JS/issues/2547)) ([c7015ba](https://github.com/parse-community/Parse-SDK-JS/commit/c7015ba42c13d7a4bbe5246b0944e64dcea1712f))

# [6.1.0-alpha.4](https://github.com/parse-community/Parse-SDK-JS/compare/6.1.0-alpha.3...6.1.0-alpha.4) (2025-03-29)


### Bug Fixes

* Security upgrade tar-fs from 2.1.1 to 2.1.2 ([#2540](https://github.com/parse-community/Parse-SDK-JS/issues/2540)) ([44eeacd](https://github.com/parse-community/Parse-SDK-JS/commit/44eeacd9b4af90c8a5f48264506d058ca2745109))

# [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)


Expand Down
16 changes: 15 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module.exports = tseslint.config({
files: ['**/*.js', '**/*.ts'],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...tseslint.configs.strict,
],
plugins: {
'@typescript-eslint': tseslint.plugin,
Expand Down Expand Up @@ -34,6 +35,9 @@ module.exports = tseslint.config({
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
Expand All @@ -51,6 +55,7 @@ module.exports = tseslint.config({
"jsdoc/require-param-description": 0,
"jsdoc/require-property-description": 0,
"jsdoc/require-param-type": 0,
"jsdoc/require-param": 1,
"jsdoc/tag-lines": 0,
"jsdoc/check-param-names": [
"error",
Expand All @@ -70,6 +75,15 @@ module.exports = tseslint.config({
}
]
},
settings: {
jsdoc: {
tagNamePreference: {
member: false,
memberof: false,
yield: false,
},
},
},
languageOptions: {
parser: tseslint.parser,
globals: {
Expand Down
4 changes: 0 additions & 4 deletions integration/test/ParseUserTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ const { v4: uuidv4 } = require('uuid');
const { twitterAuthData } = require('./helper');

class CustomUser extends Parse.User {
constructor(attributes) {
super(attributes);
}

doSomething() {
return 5;
}
Expand Down
Loading