@jsenv/core 28.3.6 → 28.4.2
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/dist/main.js
CHANGED
|
@@ -4452,6 +4452,7 @@ const parseAndTransformJsUrls = async (urlInfo, context) => {
|
|
|
4452
4452
|
data: jsMention.data,
|
|
4453
4453
|
baseUrl: {
|
|
4454
4454
|
"StringLiteral": jsMention.baseUrl,
|
|
4455
|
+
"window.location": urlInfo.url,
|
|
4455
4456
|
"window.origin": context.rootDirectoryUrl,
|
|
4456
4457
|
"import.meta.url": urlInfo.url,
|
|
4457
4458
|
"context.meta.url": urlInfo.url,
|
|
@@ -10555,7 +10556,8 @@ const bundleJsModules = async ({
|
|
|
10555
10556
|
const {
|
|
10556
10557
|
babelHelpersChunk = true,
|
|
10557
10558
|
include,
|
|
10558
|
-
preserveDynamicImport = false
|
|
10559
|
+
preserveDynamicImport = false,
|
|
10560
|
+
strictExports = false
|
|
10559
10561
|
} = options;
|
|
10560
10562
|
const {
|
|
10561
10563
|
jsModuleBundleUrlInfos
|
|
@@ -10570,7 +10572,8 @@ const bundleJsModules = async ({
|
|
|
10570
10572
|
sourcemaps,
|
|
10571
10573
|
include,
|
|
10572
10574
|
babelHelpersChunk,
|
|
10573
|
-
preserveDynamicImport
|
|
10575
|
+
preserveDynamicImport,
|
|
10576
|
+
strictExports
|
|
10574
10577
|
});
|
|
10575
10578
|
return jsModuleBundleUrlInfos;
|
|
10576
10579
|
};
|
|
@@ -10585,6 +10588,7 @@ const rollupPluginJsenv = ({
|
|
|
10585
10588
|
include,
|
|
10586
10589
|
babelHelpersChunk,
|
|
10587
10590
|
preserveDynamicImport,
|
|
10591
|
+
strictExports,
|
|
10588
10592
|
resultRef
|
|
10589
10593
|
}) => {
|
|
10590
10594
|
let _rollupEmitFile = () => {
|
|
@@ -10635,8 +10639,8 @@ const rollupPluginJsenv = ({
|
|
|
10635
10639
|
|
|
10636
10640
|
emitChunk({
|
|
10637
10641
|
id,
|
|
10638
|
-
implicitlyLoadedAfterOneOf: previousNonEntryPointModuleId ? [previousNonEntryPointModuleId] : null
|
|
10639
|
-
|
|
10642
|
+
implicitlyLoadedAfterOneOf: previousNonEntryPointModuleId ? [previousNonEntryPointModuleId] : null,
|
|
10643
|
+
preserveSignature: strictExports ? "strict" : jsModuleUrlInfo.dependents.size < 2 ? "allow-extension" : "strict"
|
|
10640
10644
|
});
|
|
10641
10645
|
previousNonEntryPointModuleId = id;
|
|
10642
10646
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "28.
|
|
3
|
+
"version": "28.4.2",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@c88/v8-coverage": "0.1.1",
|
|
67
67
|
"@financial-times/polyfill-useragent-normaliser": "1.10.2",
|
|
68
68
|
"@jsenv/abort": "4.2.4",
|
|
69
|
-
"@jsenv/ast": "1.
|
|
69
|
+
"@jsenv/ast": "1.3.0",
|
|
70
70
|
"@jsenv/babel-plugins": "1.0.7",
|
|
71
71
|
"@jsenv/filesystem": "4.1.3",
|
|
72
72
|
"@jsenv/importmap": "1.2.1",
|
|
@@ -39,6 +39,7 @@ export const bundleJsModules = async ({
|
|
|
39
39
|
babelHelpersChunk = true,
|
|
40
40
|
include,
|
|
41
41
|
preserveDynamicImport = false,
|
|
42
|
+
strictExports = false,
|
|
42
43
|
} = options
|
|
43
44
|
const { jsModuleBundleUrlInfos } = await buildWithRollup({
|
|
44
45
|
signal,
|
|
@@ -54,6 +55,7 @@ export const bundleJsModules = async ({
|
|
|
54
55
|
include,
|
|
55
56
|
babelHelpersChunk,
|
|
56
57
|
preserveDynamicImport,
|
|
58
|
+
strictExports,
|
|
57
59
|
})
|
|
58
60
|
return jsModuleBundleUrlInfos
|
|
59
61
|
}
|
|
@@ -69,6 +71,7 @@ const rollupPluginJsenv = ({
|
|
|
69
71
|
include,
|
|
70
72
|
babelHelpersChunk,
|
|
71
73
|
preserveDynamicImport,
|
|
74
|
+
strictExports,
|
|
72
75
|
|
|
73
76
|
resultRef,
|
|
74
77
|
}) => {
|
|
@@ -116,7 +119,11 @@ const rollupPluginJsenv = ({
|
|
|
116
119
|
implicitlyLoadedAfterOneOf: previousNonEntryPointModuleId
|
|
117
120
|
? [previousNonEntryPointModuleId]
|
|
118
121
|
: null,
|
|
119
|
-
|
|
122
|
+
preserveSignature: strictExports
|
|
123
|
+
? "strict"
|
|
124
|
+
: jsModuleUrlInfo.dependents.size < 2
|
|
125
|
+
? "allow-extension"
|
|
126
|
+
: "strict",
|
|
120
127
|
})
|
|
121
128
|
previousNonEntryPointModuleId = id
|
|
122
129
|
})
|
|
@@ -32,6 +32,7 @@ export const parseAndTransformJsUrls = async (urlInfo, context) => {
|
|
|
32
32
|
data: jsMention.data,
|
|
33
33
|
baseUrl: {
|
|
34
34
|
"StringLiteral": jsMention.baseUrl,
|
|
35
|
+
"window.location": urlInfo.url,
|
|
35
36
|
"window.origin": context.rootDirectoryUrl,
|
|
36
37
|
"import.meta.url": urlInfo.url,
|
|
37
38
|
"context.meta.url": urlInfo.url,
|