Skip to content

Commit 7c77b82

Browse files
authored
Merge branch 'alpha' into alpha
2 parents d97e80c + d72717d commit 7c77b82

File tree

7 files changed

+19
-21
lines changed

7 files changed

+19
-21
lines changed

.babelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
["@babel/preset-env", {
88
"targets": {
99
"node": "12"
10-
},
11-
"exclude": ["proposal-dynamic-import"]
10+
}
1211
}]
1312
],
1413
"sourceMaps": "inline"

changelogs/CHANGELOG_alpha.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# [5.0.0-alpha.7](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.6...5.0.0-alpha.7) (2021-11-12)
2+
3+
4+
### Bug Fixes
5+
6+
* node engine range has no upper limit to exclude incompatible node versions ([#7692](https://github.com/parse-community/parse-server/issues/7692)) ([573558d](https://github.com/parse-community/parse-server/commit/573558d3adcbcc6222c92003829867e1a73eef94))
7+
8+
# [5.0.0-alpha.6](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.5...5.0.0-alpha.6) (2021-11-10)
9+
10+
11+
### Reverts
12+
13+
* refactor: allow ES import for cloud string if package type is module ([b64640c](https://github.com/parse-community/parse-server/commit/b64640c5705f733798783e68d216e957044ef23c))
14+
115
# [5.0.0-alpha.5](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.4...5.0.0-alpha.5) (2021-11-01)
216

317

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "5.0.0-alpha.5",
3+
"version": "5.0.0-alpha.7",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {
@@ -135,7 +135,7 @@
135135
"madge:circular": "node_modules/.bin/madge ./src --circular"
136136
},
137137
"engines": {
138-
"node": ">=12.20.0"
138+
"node": ">=12.20.0 <16"
139139
},
140140
"bin": {
141141
"parse-server": "bin/parse-server"

spec/CloudCode.spec.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ describe('Cloud Code', () => {
3939
});
4040
});
4141

42-
it('can load cloud code as a module', async () => {
43-
process.env.npm_package_type = 'module';
44-
await reconfigureServer({ cloud: './spec/cloud/cloudCodeModuleFile.js' });
45-
const result = await Parse.Cloud.run('cloudCodeInFile');
46-
expect(result).toEqual('It is possible to define cloud code in a file.');
47-
delete process.env.npm_package_type;
48-
});
49-
5042
it('can create functions', done => {
5143
Parse.Cloud.define('hello', () => {
5244
return 'Hello world!';

spec/cloud/cloudCodeModuleFile.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/ParseServer.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,7 @@ class ParseServer {
108108
if (typeof cloud === 'function') {
109109
cloud(Parse);
110110
} else if (typeof cloud === 'string') {
111-
if (process.env.npm_package_type === 'module') {
112-
import(path.resolve(process.cwd(), cloud));
113-
} else {
114-
require(path.resolve(process.cwd(), cloud));
115-
}
111+
require(path.resolve(process.cwd(), cloud));
116112
} else {
117113
throw "argument 'cloud' must either be a string or a function";
118114
}

0 commit comments

Comments
 (0)