@modern-js/plugin-bff 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +2 -2
- package/dist/cjs/loader.js +2 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm-node/loader.js +2 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @modern-js/plugin-bff
|
|
2
2
|
|
|
3
|
+
## 2.9.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @modern-js/bff-core@2.9.0
|
|
8
|
+
- @modern-js/create-request@2.9.0
|
|
9
|
+
- @modern-js/server-utils@2.9.0
|
|
10
|
+
- @modern-js/utils@2.9.0
|
|
11
|
+
|
|
12
|
+
## 2.8.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 1a8d0ffef0: fix: remove require.cache first when the bff loader execute
|
|
17
|
+
fix: 当 bff.loader 执行时,移除 require.cache
|
|
18
|
+
- Updated dependencies [1a8d0ffef0]
|
|
19
|
+
- Updated dependencies [1104a9f18b]
|
|
20
|
+
- Updated dependencies [2c1151271d]
|
|
21
|
+
- Updated dependencies [4cfea8ce49]
|
|
22
|
+
- Updated dependencies [1f6ca2c7fb]
|
|
23
|
+
- @modern-js/create-request@2.8.0
|
|
24
|
+
- @modern-js/utils@2.8.0
|
|
25
|
+
- @modern-js/server-utils@2.8.0
|
|
26
|
+
- @modern-js/bff-core@2.8.0
|
|
27
|
+
|
|
3
28
|
## 2.7.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-sta
|
|
|
19
19
|
|
|
20
20
|
## Contributing
|
|
21
21
|
|
|
22
|
-
Please read the [Contributing Guide](https://github.com/
|
|
22
|
+
Please read the [Contributing Guide](https://github.com/web-infra-dev/modern.js/blob/main/CONTRIBUTING.md).
|
|
23
23
|
|
|
24
24
|
## License
|
|
25
25
|
|
|
26
|
-
Modern.js is [MIT licensed](https://github.com/
|
|
26
|
+
Modern.js is [MIT licensed](https://github.com/web-infra-dev/modern.js/blob/main/LICENSE).
|
package/dist/cjs/loader.js
CHANGED
|
@@ -24,9 +24,10 @@ var import_bff_core = require("@modern-js/bff-core");
|
|
|
24
24
|
var import_utils = require("@modern-js/utils");
|
|
25
25
|
async function loader(source) {
|
|
26
26
|
this.cacheable();
|
|
27
|
+
const { resourcePath } = this;
|
|
28
|
+
delete require.cache[resourcePath];
|
|
27
29
|
const callback = this.async();
|
|
28
30
|
const draftOptions = this.getOptions();
|
|
29
|
-
const { resourcePath } = this;
|
|
30
31
|
const warning = `The file ${resourcePath} is not allowd to be imported in src directory, only API definition files are allowed.`;
|
|
31
32
|
if (!draftOptions.existLambda) {
|
|
32
33
|
import_utils.logger.warn(warning);
|
package/dist/esm/loader.js
CHANGED
|
@@ -129,14 +129,15 @@ function loader(source) {
|
|
|
129
129
|
}
|
|
130
130
|
function _loader() {
|
|
131
131
|
_loader = _asyncToGenerator(function(source) {
|
|
132
|
-
var callback, draftOptions,
|
|
132
|
+
var resourcePath, callback, draftOptions, warning, options, lambdaDir, result;
|
|
133
133
|
return __generator(this, function(_state) {
|
|
134
134
|
switch(_state.label){
|
|
135
135
|
case 0:
|
|
136
136
|
this.cacheable();
|
|
137
|
+
resourcePath = this.resourcePath;
|
|
138
|
+
delete require.cache[resourcePath];
|
|
137
139
|
callback = this.async();
|
|
138
140
|
draftOptions = this.getOptions();
|
|
139
|
-
resourcePath = this.resourcePath;
|
|
140
141
|
warning = "The file ".concat(resourcePath, " is not allowd to be imported in src directory, only API definition files are allowed.");
|
|
141
142
|
if (!draftOptions.existLambda) {
|
|
142
143
|
logger.warn(warning);
|
package/dist/esm-node/loader.js
CHANGED
|
@@ -2,9 +2,10 @@ import { generateClient } from "@modern-js/bff-core";
|
|
|
2
2
|
import { logger } from "@modern-js/utils";
|
|
3
3
|
async function loader(source) {
|
|
4
4
|
this.cacheable();
|
|
5
|
+
const { resourcePath } = this;
|
|
6
|
+
delete require.cache[resourcePath];
|
|
5
7
|
const callback = this.async();
|
|
6
8
|
const draftOptions = this.getOptions();
|
|
7
|
-
const { resourcePath } = this;
|
|
8
9
|
const warning = `The file ${resourcePath} is not allowd to be imported in src directory, only API definition files are allowed.`;
|
|
9
10
|
if (!draftOptions.existLambda) {
|
|
10
11
|
logger.warn(warning);
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"name": "@modern-js/plugin-bff",
|
|
3
3
|
"description": "A Progressive React Framework for modern web development.",
|
|
4
4
|
"homepage": "https://modernjs.dev",
|
|
5
|
-
"bugs": "https://github.com/
|
|
6
|
-
"repository": "
|
|
5
|
+
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
|
|
6
|
+
"repository": "web-infra-dev/modern.js",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"react",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.9.0",
|
|
15
15
|
"jsnext:source": "./src/cli.ts",
|
|
16
16
|
"types": "./dist/types/cli.d.ts",
|
|
17
17
|
"main": "./dist/cjs/cli.js",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/core": "^7.18.0",
|
|
52
52
|
"@babel/runtime": "^7.18.0",
|
|
53
|
-
"@modern-js/bff-core": "2.
|
|
54
|
-
"@modern-js/create-request": "2.
|
|
55
|
-
"@modern-js/server-utils": "2.
|
|
56
|
-
"@modern-js/utils": "2.
|
|
53
|
+
"@modern-js/bff-core": "2.9.0",
|
|
54
|
+
"@modern-js/create-request": "2.9.0",
|
|
55
|
+
"@modern-js/server-utils": "2.9.0",
|
|
56
|
+
"@modern-js/utils": "2.9.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/babel__core": "^7.1.15",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"typescript": "^4",
|
|
66
66
|
"webpack": "^5.75.0",
|
|
67
67
|
"webpack-chain": "^6.5.1",
|
|
68
|
-
"@modern-js/runtime": "2.
|
|
69
|
-
"@modern-js/core": "2.
|
|
70
|
-
"@modern-js/bff-runtime": "2.
|
|
71
|
-
"@modern-js/server-core": "2.
|
|
72
|
-
"@modern-js/types": "2.
|
|
73
|
-
"@modern-js/app-tools": "2.
|
|
74
|
-
"@scripts/build": "2.
|
|
75
|
-
"@scripts/jest-config": "2.
|
|
68
|
+
"@modern-js/runtime": "2.9.0",
|
|
69
|
+
"@modern-js/core": "2.9.0",
|
|
70
|
+
"@modern-js/bff-runtime": "2.9.0",
|
|
71
|
+
"@modern-js/server-core": "2.9.0",
|
|
72
|
+
"@modern-js/types": "2.9.0",
|
|
73
|
+
"@modern-js/app-tools": "2.9.0",
|
|
74
|
+
"@scripts/build": "2.9.0",
|
|
75
|
+
"@scripts/jest-config": "2.9.0"
|
|
76
76
|
},
|
|
77
77
|
"sideEffects": false,
|
|
78
78
|
"publishConfig": {
|