@modern-js/plugin-bff 2.7.0 → 2.8.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @modern-js/plugin-bff
2
2
 
3
+ ## 2.8.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 1a8d0ffef0: fix: remove require.cache first when the bff loader execute
8
+ fix: 当 bff.loader 执行时,移除 require.cache
9
+ - Updated dependencies [1a8d0ffef0]
10
+ - Updated dependencies [1104a9f18b]
11
+ - Updated dependencies [2c1151271d]
12
+ - Updated dependencies [4cfea8ce49]
13
+ - Updated dependencies [1f6ca2c7fb]
14
+ - @modern-js/create-request@2.8.0
15
+ - @modern-js/utils@2.8.0
16
+ - @modern-js/server-utils@2.8.0
17
+ - @modern-js/bff-core@2.8.0
18
+
3
19
  ## 2.7.0
4
20
 
5
21
  ### 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/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md).
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/modern-js-dev/modern.js/blob/main/LICENSE).
26
+ Modern.js is [MIT licensed](https://github.com/web-infra-dev/modern.js/blob/main/LICENSE).
@@ -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);
@@ -129,14 +129,15 @@ function loader(source) {
129
129
  }
130
130
  function _loader() {
131
131
  _loader = _asyncToGenerator(function(source) {
132
- var callback, draftOptions, resourcePath, warning, options, lambdaDir, result;
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);
@@ -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/modern-js-dev/modern.js/issues",
6
- "repository": "modern-js-dev/modern.js",
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.7.0",
14
+ "version": "2.8.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.7.0",
54
- "@modern-js/create-request": "2.7.0",
55
- "@modern-js/server-utils": "2.7.0",
56
- "@modern-js/utils": "2.7.0"
53
+ "@modern-js/bff-core": "2.8.0",
54
+ "@modern-js/create-request": "2.8.0",
55
+ "@modern-js/server-utils": "2.8.0",
56
+ "@modern-js/utils": "2.8.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.7.0",
69
- "@modern-js/core": "2.7.0",
70
- "@modern-js/bff-runtime": "2.7.0",
71
- "@modern-js/server-core": "2.7.0",
72
- "@modern-js/types": "2.7.0",
73
- "@modern-js/app-tools": "2.7.0",
74
- "@scripts/build": "2.7.0",
75
- "@scripts/jest-config": "2.7.0"
68
+ "@modern-js/runtime": "2.8.0",
69
+ "@modern-js/core": "2.8.0",
70
+ "@modern-js/bff-runtime": "2.8.0",
71
+ "@modern-js/server-core": "2.8.0",
72
+ "@modern-js/types": "2.8.0",
73
+ "@modern-js/app-tools": "2.8.0",
74
+ "@scripts/build": "2.8.0",
75
+ "@scripts/jest-config": "2.8.0"
76
76
  },
77
77
  "sideEffects": false,
78
78
  "publishConfig": {