@modern-js/plugin-polyfill 0.0.0-next-20230213183117 → 0.0.0-next-20230214035517

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,12 +1,15 @@
1
1
  # @modern-js/plugin-polyfill
2
2
 
3
- ## 0.0.0-next-20230213183117
3
+ ## 0.0.0-next-20230214035517
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - 57a96cbf3: chore: modify package.json entry fields and build config
8
+ chore: 更改 package.json entry 字段以及构建配置
9
+ - Updated dependencies [57a96cbf3]
7
10
  - Updated dependencies [1b0ce87bc]
8
11
  - Updated dependencies [11c053b46]
9
- - @modern-js/utils@0.0.0-next-20230213183117
12
+ - @modern-js/utils@0.0.0-next-20230214035517
10
13
 
11
14
  ## 2.4.0
12
15
 
File without changes
File without changes
@@ -21,26 +21,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  mod
22
22
  ));
23
23
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
- var __async = (__this, __arguments, generator) => {
25
- return new Promise((resolve, reject) => {
26
- var fulfilled = (value) => {
27
- try {
28
- step(generator.next(value));
29
- } catch (e) {
30
- reject(e);
31
- }
32
- };
33
- var rejected = (value) => {
34
- try {
35
- step(generator.throw(value));
36
- } catch (e) {
37
- reject(e);
38
- }
39
- };
40
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
41
- step((generator = generator.apply(__this, __arguments)).next());
42
- });
43
- };
44
24
  var src_exports = {};
45
25
  __export(src_exports, {
46
26
  default: () => src_default
@@ -64,7 +44,7 @@ var src_default = () => ({
64
44
  const flagStr = flags.join(",");
65
45
  return `${name}-${flagStr}`;
66
46
  }).join(",");
67
- return (context, next) => __async(this, null, function* () {
47
+ return async (context, next) => {
68
48
  if (context.url !== route) {
69
49
  return next();
70
50
  }
@@ -84,7 +64,7 @@ var src_default = () => ({
84
64
  );
85
65
  return context.res.end(matched);
86
66
  }
87
- const polyfill = yield (0, import_polyfill_lib.getPolyfillString)({
67
+ const polyfill = await (0, import_polyfill_lib.getPolyfillString)({
88
68
  uaString: context.headers["user-agent"],
89
69
  minify,
90
70
  features
@@ -92,7 +72,7 @@ var src_default = () => ({
92
72
  cache.set(cacheKey, polyfill);
93
73
  context.res.setHeader("content-type", import_utils.mime.contentType("js"));
94
74
  return context.res.end(polyfill);
95
- });
75
+ };
96
76
  }
97
77
  })
98
78
  });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,23 +1,3 @@
1
- var __async = (__this, __arguments, generator) => {
2
- return new Promise((resolve, reject) => {
3
- var fulfilled = (value) => {
4
- try {
5
- step(generator.next(value));
6
- } catch (e) {
7
- reject(e);
8
- }
9
- };
10
- var rejected = (value) => {
11
- try {
12
- step(generator.throw(value));
13
- } catch (e) {
14
- reject(e);
15
- }
16
- };
17
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
- step((generator = generator.apply(__this, __arguments)).next());
19
- });
20
- };
21
1
  import { getPolyfillString } from "@modern-js/polyfill-lib";
22
2
  import { mime } from "@modern-js/utils";
23
3
  import Parser from "ua-parser-js";
@@ -36,7 +16,7 @@ var src_default = () => ({
36
16
  const flagStr = flags.join(",");
37
17
  return `${name}-${flagStr}`;
38
18
  }).join(",");
39
- return (context, next) => __async(this, null, function* () {
19
+ return async (context, next) => {
40
20
  if (context.url !== route) {
41
21
  return next();
42
22
  }
@@ -56,7 +36,7 @@ var src_default = () => ({
56
36
  );
57
37
  return context.res.end(matched);
58
38
  }
59
- const polyfill = yield getPolyfillString({
39
+ const polyfill = await getPolyfillString({
60
40
  uaString: context.headers["user-agent"],
61
41
  minify,
62
42
  features
@@ -64,7 +44,7 @@ var src_default = () => ({
64
44
  cache.set(cacheKey, polyfill);
65
45
  context.res.setHeader("content-type", mime.contentType("js"));
66
46
  return context.res.end(polyfill);
67
- });
47
+ };
68
48
  }
69
49
  })
70
50
  });
File without changes
File without changes
package/package.json CHANGED
@@ -11,36 +11,35 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-20230213183117",
14
+ "version": "0.0.0-next-20230214035517",
15
15
  "jsnext:source": "./src/cli.ts",
16
16
  "types": "./dist/types/cli.d.ts",
17
- "main": "./dist/js/node/cli.js",
18
- "module": "./dist/js/treeshaking/cli.js",
19
- "jsnext:modern": "./dist/js/modern/cli.js",
17
+ "main": "./dist/cjs/cli.js",
18
+ "module": "./dist/esm/cli.js",
20
19
  "exports": {
21
20
  ".": {
22
21
  "jsnext:source": "./src/cli.ts",
23
22
  "node": {
24
- "import": "./dist/js/node/cli.js",
25
- "require": "./dist/js/node/cli.js"
23
+ "import": "./dist/cjs/cli.js",
24
+ "require": "./dist/cjs/cli.js"
26
25
  },
27
- "default": "./dist/js/node/cli.js"
26
+ "default": "./dist/cjs/cli.js"
28
27
  },
29
28
  "./cli": {
30
29
  "jsnext:source": "./src/cli.ts",
31
30
  "node": {
32
- "import": "./dist/js/node/cli.js",
33
- "require": "./dist/js/node/cli.js"
31
+ "import": "./dist/cjs/cli.js",
32
+ "require": "./dist/cjs/cli.js"
34
33
  },
35
- "default": "./dist/js/node/cli.js"
34
+ "default": "./dist/cjs/cli.js"
36
35
  },
37
36
  "./server": {
38
37
  "node": {
39
38
  "jsnext:source": "./src/index.ts",
40
- "import": "./dist/js/modern/index.js",
41
- "require": "./dist/js/node/index.js"
39
+ "import": "./dist/esm-node/index.js",
40
+ "require": "./dist/cjs/index.js"
42
41
  },
43
- "default": "./dist/js/treeshaking/index.js"
42
+ "default": "./dist/esm/index.js"
44
43
  }
45
44
  },
46
45
  "dependencies": {
@@ -48,7 +47,7 @@
48
47
  "@modern-js/polyfill-lib": "^1.0.0",
49
48
  "lru-cache": "^6.0.0",
50
49
  "ua-parser-js": "^0.7.28",
51
- "@modern-js/utils": "0.0.0-next-20230213183117"
50
+ "@modern-js/utils": "0.0.0-next-20230214035517"
52
51
  },
53
52
  "devDependencies": {
54
53
  "@types/jest": "^27",
@@ -57,12 +56,13 @@
57
56
  "@types/ua-parser-js": "^0.7.36",
58
57
  "typescript": "^4",
59
58
  "jest": "^27",
60
- "@modern-js/server-core": "0.0.0-next-20230213183117",
61
- "@modern-js/app-tools": "0.0.0-next-20230213183117",
62
- "@modern-js/core": "0.0.0-next-20230213183117",
63
- "@modern-js/types": "0.0.0-next-20230213183117",
64
- "@scripts/build": "0.0.0-next-20230213183117",
65
- "@scripts/jest-config": "0.0.0-next-20230213183117"
59
+ "@modern-js/build-config": "0.0.0-next-20230214035517",
60
+ "@modern-js/server-core": "0.0.0-next-20230214035517",
61
+ "@modern-js/app-tools": "0.0.0-next-20230214035517",
62
+ "@modern-js/types": "0.0.0-next-20230214035517",
63
+ "@scripts/build": "0.0.0-next-20230214035517",
64
+ "@modern-js/core": "0.0.0-next-20230214035517",
65
+ "@scripts/jest-config": "0.0.0-next-20230214035517"
66
66
  },
67
67
  "sideEffects": false,
68
68
  "publishConfig": {