@jsenv/plugin-commonjs 1.1.2 → 1.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-commonjs",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  "cjs-module-lexer": "1.2.2",
25
25
  "is-valid-identifier": "2.0.2",
26
26
  "resolve": "1.22.1",
27
- "rollup": "3.2.5",
27
+ "rollup": "3.4.0",
28
28
  "rollup-plugin-node-globals": "1.4.0",
29
29
  "rollup-plugin-polyfill-node": "0.11.0",
30
30
  "vm2": "3.9.11"
@@ -39,22 +39,20 @@ export const jsenvPluginCommonJs = ({
39
39
  rootDirectoryUrl,
40
40
  )
41
41
  },
42
- redirectUrl: {
43
- js_import: (reference) => {
44
- if (reference.searchParams.has("cjs_as_js_module")) {
45
- markAsJsModuleProxy(reference)
46
- return null
47
- }
48
- const { commonjs } = URL_META.applyAssociations({
49
- url: reference.url,
50
- associations,
51
- })
52
- if (!commonjs) {
53
- return null
54
- }
55
- reference.data.commonjs = commonjs
56
- return turnIntoJsModuleProxy(reference)
57
- },
42
+ redirectUrl: (reference) => {
43
+ if (reference.searchParams.has("cjs_as_js_module")) {
44
+ markAsJsModuleProxy(reference)
45
+ return null
46
+ }
47
+ const { commonjs } = URL_META.applyAssociations({
48
+ url: reference.url,
49
+ associations,
50
+ })
51
+ if (!commonjs) {
52
+ return null
53
+ }
54
+ reference.data.commonjs = commonjs
55
+ return turnIntoJsModuleProxy(reference)
58
56
  },
59
57
  fetchUrlContent: async (urlInfo, context) => {
60
58
  const [commonJsReference, commonJsUrlInfo] =