Skip to content

Commit aa9b15e

Browse files
committed
Fix formating issues
1 parent 9d7fe89 commit aa9b15e

File tree

8 files changed

+68
-81
lines changed

8 files changed

+68
-81
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- master
66
pull_request:
77
branches:
8-
- "**"
8+
- '**'
99
env:
1010
NODE_VERSION: 14.17.4
1111
PARSE_SERVER_TEST_TIMEOUT: 20000
@@ -32,45 +32,45 @@ jobs:
3232
- name: CI Self-Check
3333
run: npm run ci:check
3434
check-lint:
35-
name: Lint
36-
timeout-minutes: 15
37-
runs-on: ubuntu-18.04
38-
steps:
39-
- uses: actions/checkout@v2
40-
- name: Use Node.js ${{ matrix.NODE_VERSION }}
41-
uses: actions/setup-node@v1
42-
with:
43-
node-version: ${{ matrix.node-version }}
44-
- name: Cache Node.js modules
45-
uses: actions/cache@v2
46-
with:
47-
path: ~/.npm
48-
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
49-
restore-keys: |
50-
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
51-
- name: Install dependencies
52-
run: npm ci
53-
- run: npm run lint
35+
name: Lint
36+
timeout-minutes: 15
37+
runs-on: ubuntu-18.04
38+
steps:
39+
- uses: actions/checkout@v2
40+
- name: Use Node.js ${{ matrix.NODE_VERSION }}
41+
uses: actions/setup-node@v1
42+
with:
43+
node-version: ${{ matrix.node-version }}
44+
- name: Cache Node.js modules
45+
uses: actions/cache@v2
46+
with:
47+
path: ~/.npm
48+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
49+
restore-keys: |
50+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
51+
- name: Install dependencies
52+
run: npm ci
53+
- run: npm run lint
5454
check-circular:
55-
name: Circular Dependencies
56-
timeout-minutes: 5
57-
runs-on: ubuntu-18.04
58-
steps:
59-
- uses: actions/checkout@v2
60-
- name: Use Node.js ${{ matrix.NODE_VERSION }}
61-
uses: actions/setup-node@v1
62-
with:
63-
node-version: ${{ matrix.node-version }}
64-
- name: Cache Node.js modules
65-
uses: actions/cache@v2
66-
with:
67-
path: ~/.npm
68-
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
69-
restore-keys: |
70-
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
71-
- name: Install dependencies
72-
run: npm ci
73-
- run: npm run madge:circular
55+
name: Circular Dependencies
56+
timeout-minutes: 5
57+
runs-on: ubuntu-18.04
58+
steps:
59+
- uses: actions/checkout@v2
60+
- name: Use Node.js ${{ matrix.NODE_VERSION }}
61+
uses: actions/setup-node@v1
62+
with:
63+
node-version: ${{ matrix.node-version }}
64+
- name: Cache Node.js modules
65+
uses: actions/cache@v2
66+
with:
67+
path: ~/.npm
68+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
69+
restore-keys: |
70+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
71+
- name: Install dependencies
72+
run: npm ci
73+
- run: npm run madge:circular
7474
check-docker:
7575
name: Docker Build
7676
timeout-minutes: 5
@@ -142,8 +142,8 @@ jobs:
142142
redis:
143143
image: redis
144144
ports:
145-
- 6379:6379
146-
env:
145+
- 6379:6379
146+
env:
147147
MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }}
148148
MONGODB_TOPOLOGY: ${{ matrix.MONGODB_TOPOLOGY }}
149149
MONGODB_STORAGE_ENGINE: ${{ matrix.MONGODB_STORAGE_ENGINE }}

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ ___
140140
- Add ability to pass context of an object via a header, X-Parse-Cloud-Context, for Cloud Code triggers. The header addition allows client SDK's to add context without injecting _context in the body of JSON objects (Corey Baker) [#7437](https://github.com/parse-community/parse-server/pull/7437)
141141

142142
___
143-
144-
### 4.5.0
143+
## 4.5.0
145144
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.4.0...4.5.0)
146145
### Breaking Changes
147146
- FIX: Consistent casing for afterLiveQueryEvent. The afterLiveQueryEvent was introduced in 4.4.0 with inconsistent casing for the event names, which was fixed in 4.5.0. [#7023](https://github.com/parse-community/parse-server/pull/7023). Thanks to [dblythy](https://github.com/dblythy).

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"@graphql-tools/links": "6.2.5",
2424
"@graphql-tools/stitch": "6.2.4",
2525
"@graphql-tools/utils": "6.2.4",
26-
"@node-rs/bcrypt": "1.1.0",
2726
"@parse/fs-files-adapter": "1.2.0",
2827
"@parse/push-adapter": "3.4.0",
2928
"apollo-server-express": "2.25.2",
@@ -69,7 +68,6 @@
6968
"@babel/plugin-transform-flow-strip-types": "7.9.0",
7069
"@babel/preset-env": "7.10.0",
7170
"@parse/minami": "1.0.0",
72-
"@types/parse": "^2.18.6",
7371
"all-node-versions": "8.0.0",
7472
"apollo-cache-inmemory": "1.6.6",
7573
"apollo-client": "2.6.10",
@@ -123,7 +121,7 @@
123121
"posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.8} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner stop",
124122
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.8} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 nyc jasmine",
125123
"start": "node ./bin/parse-server",
126-
"prettier": "prettier --write {src,spec}/{**/*,*}.js",
124+
"prettier": "prettier --write '{src,spec}/{**/*,*}.js'",
127125
"prepare": "npm run build",
128126
"postinstall": "node -p 'require(\"./postinstall.js\")()'",
129127
"madge:circular": "node_modules/.bin/madge ./src --circular"
@@ -153,7 +151,8 @@
153151
},
154152
"lint-staged": {
155153
"{src,spec}/{**/*,*}.js": [
156-
"npm run prettier",
154+
"prettier --write",
155+
"eslint --fix --cache",
157156
"git add"
158157
]
159158
}

src/Deprecator/Deprecator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ class Deprecator {
101101
changeNewKey == null
102102
? undefined
103103
: changeNewKey.length > 0
104-
? `renamed to '${changeNewKey}'`
105-
: `removed`;
104+
? `renamed to '${changeNewKey}'`
105+
: `removed`;
106106

107107
// Compose message
108108
let output = `DeprecationWarning: The Parse Server ${type} '${key}' `;

src/Options/docs.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* @property {String} appId Your Parse Application ID
1010
* @property {String} appName Sets the app name
1111
* @property {Any} auth Configuration for your authentication providers, as stringified JSON. See http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication
12-
* @property {Function} beforeSchemasMigration Callback when server has started and before running schemas migration operations if schemas key provided
1312
* @property {Adapter<CacheAdapter>} cacheAdapter Adapter module for the cache
1413
* @property {Number} cacheMaxSize Sets the maximum size for the in memory cache, defaults to 10000
1514
* @property {Number} cacheTTL Sets the TTL for the in memory cache (in ms), defaults to 5000 (5 seconds)
@@ -67,7 +66,6 @@
6766
* @property {String} restAPIKey Key for REST calls
6867
* @property {Boolean} revokeSessionOnPasswordReset When a user changes their password, either through the reset password email or while logged in, all sessions are revoked if this is true. Set to false if you don't want to revoke sessions.
6968
* @property {Boolean} scheduledPush Configuration for push scheduling, defaults to false.
70-
* @property {JSONSchema[]} schemas Rest representation on Parse.Schema https://docs.parseplatform.org/rest/guide/#adding-a-schema
7169
* @property {SecurityOptions} security The security options to identify and report weak security settings.
7270
* @property {Function} serverCloseComplete Callback when server has closed
7371
* @property {Function} serverStartComplete Callback when server has started
@@ -121,14 +119,6 @@
121119
* @property {String} passwordResetSuccess The URL to the custom page for password reset -> success.
122120
*/
123121

124-
/**
125-
* @interface FieldType
126-
*/
127-
128-
/**
129-
* @interface JSONSchema
130-
*/
131-
132122
/**
133123
* @interface CustomPagesOptions
134124
* @property {String} choosePassword choose password page path

src/Routers/PagesRouter.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,15 @@ export class PagesRouter extends PromiseRouter {
236236

237237
const query = result.success
238238
? {
239-
[pageParams.username]: username,
240-
}
239+
[pageParams.username]: username,
240+
}
241241
: {
242-
[pageParams.username]: username,
243-
[pageParams.token]: token,
244-
[pageParams.appId]: config.applicationId,
245-
[pageParams.error]: result.err,
246-
[pageParams.appName]: config.appName,
247-
};
242+
[pageParams.username]: username,
243+
[pageParams.token]: token,
244+
[pageParams.appId]: config.applicationId,
245+
[pageParams.error]: result.err,
246+
[pageParams.appName]: config.appName,
247+
};
248248
const page = result.success ? pages.passwordResetSuccess : pages.passwordReset;
249249

250250
return this.goToPage(req, page, query, false);
@@ -273,8 +273,8 @@ export class PagesRouter extends PromiseRouter {
273273
const redirect = config.pages.forceRedirect
274274
? true
275275
: responseType !== undefined
276-
? responseType
277-
: req.method == 'POST';
276+
? responseType
277+
: req.method == 'POST';
278278

279279
// Include default parameters
280280
const defaultParams = this.getDefaultParams(config);
@@ -311,9 +311,9 @@ export class PagesRouter extends PromiseRouter {
311311
return Utils.getLocalizedPath(defaultPath, locale).then(({ path, subdir }) =>
312312
redirect
313313
? this.redirectResponse(
314-
this.composePageUrl(defaultFile, config.publicServerURL, subdir),
315-
params
316-
)
314+
this.composePageUrl(defaultFile, config.publicServerURL, subdir),
315+
params
316+
)
317317
: this.pageResponse(path, params, placeholders)
318318
);
319319
} else {
@@ -452,8 +452,8 @@ export class PagesRouter extends PromiseRouter {
452452
typeof this.pagesConfig.placeholders === 'function'
453453
? this.pagesConfig.placeholders(params)
454454
: Object.prototype.toString.call(this.pagesConfig.placeholders) === '[object Object]'
455-
? this.pagesConfig.placeholders
456-
: {};
455+
? this.pagesConfig.placeholders
456+
: {};
457457
if (configPlaceholders instanceof Promise) {
458458
configPlaceholders = await configPlaceholders;
459459
}
@@ -543,10 +543,10 @@ export class PagesRouter extends PromiseRouter {
543543
getDefaultParams(config) {
544544
return config
545545
? {
546-
[pageParams.appId]: config.appId,
547-
[pageParams.appName]: config.appName,
548-
[pageParams.publicServerUrl]: config.publicServerURL,
549-
}
546+
[pageParams.appId]: config.appId,
547+
[pageParams.appName]: config.appName,
548+
[pageParams.publicServerUrl]: config.publicServerURL,
549+
}
550550
: {};
551551
}
552552

src/batch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ function makeBatchRoutingPathFunction(originalUrl, serverURL, publicServerURL) {
4848
startsWithLocal && startsWithPublic
4949
? Math.max(localPath.length, publicPath.length)
5050
: startsWithLocal
51-
? localPath.length
52-
: publicPath.length;
51+
? localPath.length
52+
: publicPath.length;
5353

5454
const newPath = path.posix.join('/', localPath, '/', requestPath.slice(pathLengthToUse));
5555

0 commit comments

Comments
 (0)