@modern-js/plugin-polyfill 2.40.0 → 2.42.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.
@@ -49,7 +49,8 @@ const generateCacheKey = (options) => {
49
49
  keyCache.set(str, hash);
50
50
  return hash;
51
51
  };
52
- class Cache {
52
+ var Cache;
53
+ Cache = class Cache2 {
53
54
  get(hash) {
54
55
  return this.caches.get(hash);
55
56
  }
@@ -63,7 +64,7 @@ class Cache {
63
64
  length: (v) => v.length
64
65
  });
65
66
  }
66
- }
67
+ };
67
68
  // Annotate the CommonJS export names for ESM import in node:
68
69
  0 && (module.exports = {
69
70
  generateCacheKey
@@ -17,7 +17,8 @@ var generateCacheKey = function(options) {
17
17
  keyCache.set(str, hash);
18
18
  return hash;
19
19
  };
20
- var Cache = /* @__PURE__ */ function() {
20
+ var Cache;
21
+ Cache = /* @__PURE__ */ function() {
21
22
  "use strict";
22
23
  function Cache2() {
23
24
  _class_call_check(this, Cache2);
@@ -15,7 +15,8 @@ const generateCacheKey = (options) => {
15
15
  keyCache.set(str, hash);
16
16
  return hash;
17
17
  };
18
- class Cache {
18
+ var Cache;
19
+ Cache = class Cache2 {
19
20
  get(hash) {
20
21
  return this.caches.get(hash);
21
22
  }
@@ -29,7 +30,7 @@ class Cache {
29
30
  length: (v) => v.length
30
31
  });
31
32
  }
32
- }
33
+ };
33
34
  export {
34
35
  Cache as default,
35
36
  generateCacheKey
@@ -1,4 +1,4 @@
1
1
  import type { CliPlugin } from '@modern-js/core';
2
2
  import type { AppTools } from '@modern-js/app-tools';
3
3
  export declare const polyfillPlugin: () => CliPlugin<AppTools>;
4
- export default polyfillPlugin;
4
+ export default polyfillPlugin;
@@ -1,4 +1,4 @@
1
1
  export declare const defaultPolyfill = "/__polyfill__";
2
2
  export declare const getDefaultFeatures: () => Record<string, {
3
- flags: string[];
4
- }>;
3
+ flags: string[];
4
+ }>;
@@ -1,3 +1,3 @@
1
1
  import type { ServerPlugin } from '@modern-js/server-core';
2
2
  declare const _default: () => ServerPlugin;
3
- export default _default;
3
+ export default _default;
@@ -1,14 +1,14 @@
1
1
  type CacheQueryOptions = {
2
- features: string;
3
- minify: boolean;
4
- name: string;
5
- version: string;
2
+ features: string;
3
+ minify: boolean;
4
+ name: string;
5
+ version: string;
6
6
  };
7
7
  export declare const generateCacheKey: (options: CacheQueryOptions) => string;
8
8
  export default class Cache {
9
- private readonly caches;
10
- constructor();
11
- get(hash: string): string | undefined;
12
- set(hash: string, content: string): void;
9
+ private readonly caches;
10
+ constructor();
11
+ get(hash: string): string | undefined;
12
+ set(hash: string, content: string): void;
13
13
  }
14
- export {};
14
+ export {};
@@ -1,9 +1,9 @@
1
1
  export type ServerPolyfill = {
2
- polyfill: {
3
- route: string;
4
- features: Record<string, {
5
- flags: string[];
6
- }>;
7
- minify: boolean;
8
- };
9
- };
2
+ polyfill: {
3
+ route: string;
4
+ features: Record<string, {
5
+ flags: string[];
6
+ }>;
7
+ minify: boolean;
8
+ };
9
+ };
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.40.0",
18
+ "version": "2.42.0",
19
19
  "jsnext:source": "./src/cli.ts",
20
20
  "types": "./dist/types/cli.d.ts",
21
21
  "main": "./dist/cjs/cli.js",
@@ -50,8 +50,8 @@
50
50
  "@modern-js/polyfill-lib": "^1.0.0",
51
51
  "lru-cache": "^6.0.0",
52
52
  "ua-parser-js": "^0.7.33",
53
- "@swc/helpers": "0.5.1",
54
- "@modern-js/utils": "2.40.0"
53
+ "@swc/helpers": "0.5.3",
54
+ "@modern-js/utils": "2.42.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/jest": "^29",
@@ -60,12 +60,12 @@
60
60
  "@types/ua-parser-js": "^0.7.36",
61
61
  "typescript": "^5",
62
62
  "jest": "^29",
63
- "@modern-js/server-core": "2.40.0",
64
- "@modern-js/app-tools": "2.40.0",
65
- "@modern-js/types": "2.40.0",
66
- "@scripts/build": "2.40.0",
67
- "@modern-js/core": "2.40.0",
68
- "@scripts/jest-config": "2.40.0"
63
+ "@modern-js/server-core": "2.42.0",
64
+ "@modern-js/app-tools": "2.42.0",
65
+ "@modern-js/types": "2.42.0",
66
+ "@modern-js/core": "2.42.0",
67
+ "@scripts/build": "2.42.0",
68
+ "@scripts/jest-config": "2.42.0"
69
69
  },
70
70
  "sideEffects": false,
71
71
  "publishConfig": {