@jsenv/core 41.5.22 → 41.5.23
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/build/build.js
CHANGED
|
@@ -10128,17 +10128,16 @@ const jsenvPluginAutoreloadOnServerRestart = () => {
|
|
|
10128
10128
|
};
|
|
10129
10129
|
};
|
|
10130
10130
|
|
|
10131
|
-
|
|
10132
|
-
*
|
|
10133
|
-
*
|
|
10134
|
-
*
|
|
10135
|
-
*
|
|
10136
|
-
*
|
|
10137
|
-
* qui ne déclare pas le field side effect afin
|
|
10138
|
-
* d'override le package.json du project qui lui dit qu'il ny en a pas
|
|
10139
|
-
*
|
|
10140
|
-
* On part du principe pour le moment que c'est la respo du package racine de déclarer cela
|
|
10131
|
+
/*
|
|
10132
|
+
* Tells the bundler which modules may be dropped when nothing imports a value
|
|
10133
|
+
* from them, from the "sideEffects" field of the package.json closest to each
|
|
10134
|
+
* file — a dependency's own declaration for its files, the project's for its
|
|
10135
|
+
* own. A package that declares nothing keeps every module (the bundler's own
|
|
10136
|
+
* default), so an undeclared root only loses precision, never code.
|
|
10141
10137
|
*
|
|
10138
|
+
* Whether the project's package.json is written back with the side-effect
|
|
10139
|
+
* files this build produced is decided in build.js, and only for a project that
|
|
10140
|
+
* already declares the field; it is not this plugin's concern.
|
|
10142
10141
|
*/
|
|
10143
10142
|
|
|
10144
10143
|
|
|
@@ -10146,15 +10145,6 @@ const jsenvPluginPackageSideEffects = ({ packageDirectory }) => {
|
|
|
10146
10145
|
if (!packageDirectory.url) {
|
|
10147
10146
|
return [];
|
|
10148
10147
|
}
|
|
10149
|
-
const packageJson = packageDirectory.read(packageDirectory.url);
|
|
10150
|
-
if (!packageJson) {
|
|
10151
|
-
return [];
|
|
10152
|
-
}
|
|
10153
|
-
const { sideEffects } = packageJson;
|
|
10154
|
-
if (sideEffects !== false && !Array.isArray(sideEffects)) {
|
|
10155
|
-
return [];
|
|
10156
|
-
}
|
|
10157
|
-
|
|
10158
10148
|
const packageSideEffectsCacheMap = new Map();
|
|
10159
10149
|
const readSideEffectInfoFromClosestPackage = (urlInfo) => {
|
|
10160
10150
|
const closestPackageDirectoryUrl = urlInfo.packageDirectoryUrl;
|
|
@@ -8028,17 +8028,16 @@ const jsenvPluginAutoreloadOnServerRestart = () => {
|
|
|
8028
8028
|
};
|
|
8029
8029
|
};
|
|
8030
8030
|
|
|
8031
|
-
|
|
8032
|
-
*
|
|
8033
|
-
*
|
|
8034
|
-
*
|
|
8035
|
-
*
|
|
8036
|
-
*
|
|
8037
|
-
* qui ne déclare pas le field side effect afin
|
|
8038
|
-
* d'override le package.json du project qui lui dit qu'il ny en a pas
|
|
8039
|
-
*
|
|
8040
|
-
* On part du principe pour le moment que c'est la respo du package racine de déclarer cela
|
|
8031
|
+
/*
|
|
8032
|
+
* Tells the bundler which modules may be dropped when nothing imports a value
|
|
8033
|
+
* from them, from the "sideEffects" field of the package.json closest to each
|
|
8034
|
+
* file — a dependency's own declaration for its files, the project's for its
|
|
8035
|
+
* own. A package that declares nothing keeps every module (the bundler's own
|
|
8036
|
+
* default), so an undeclared root only loses precision, never code.
|
|
8041
8037
|
*
|
|
8038
|
+
* Whether the project's package.json is written back with the side-effect
|
|
8039
|
+
* files this build produced is decided in build.js, and only for a project that
|
|
8040
|
+
* already declares the field; it is not this plugin's concern.
|
|
8042
8041
|
*/
|
|
8043
8042
|
|
|
8044
8043
|
|
|
@@ -8046,15 +8045,6 @@ const jsenvPluginPackageSideEffects = ({ packageDirectory }) => {
|
|
|
8046
8045
|
if (!packageDirectory.url) {
|
|
8047
8046
|
return [];
|
|
8048
8047
|
}
|
|
8049
|
-
const packageJson = packageDirectory.read(packageDirectory.url);
|
|
8050
|
-
if (!packageJson) {
|
|
8051
|
-
return [];
|
|
8052
|
-
}
|
|
8053
|
-
const { sideEffects } = packageJson;
|
|
8054
|
-
if (sideEffects !== false && !Array.isArray(sideEffects)) {
|
|
8055
|
-
return [];
|
|
8056
|
-
}
|
|
8057
|
-
|
|
8058
8048
|
const packageSideEffectsCacheMap = new Map();
|
|
8059
8049
|
const readSideEffectInfoFromClosestPackage = (urlInfo) => {
|
|
8060
8050
|
const closestPackageDirectoryUrl = urlInfo.packageDirectoryUrl;
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* qui ne déclare pas le field side effect afin
|
|
8
|
-
* d'override le package.json du project qui lui dit qu'il ny en a pas
|
|
9
|
-
*
|
|
10
|
-
* On part du principe pour le moment que c'est la respo du package racine de déclarer cela
|
|
1
|
+
/*
|
|
2
|
+
* Tells the bundler which modules may be dropped when nothing imports a value
|
|
3
|
+
* from them, from the "sideEffects" field of the package.json closest to each
|
|
4
|
+
* file — a dependency's own declaration for its files, the project's for its
|
|
5
|
+
* own. A package that declares nothing keeps every module (the bundler's own
|
|
6
|
+
* default), so an undeclared root only loses precision, never code.
|
|
11
7
|
*
|
|
8
|
+
* Whether the project's package.json is written back with the side-effect
|
|
9
|
+
* files this build produced is decided in build.js, and only for a project that
|
|
10
|
+
* already declares the field; it is not this plugin's concern.
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
13
|
import { isSpecifierForNodeBuiltin } from "@jsenv/node-esm-resolution/src/node_builtin_specifiers.js";
|
|
@@ -18,15 +17,6 @@ export const jsenvPluginPackageSideEffects = ({ packageDirectory }) => {
|
|
|
18
17
|
if (!packageDirectory.url) {
|
|
19
18
|
return [];
|
|
20
19
|
}
|
|
21
|
-
const packageJson = packageDirectory.read(packageDirectory.url);
|
|
22
|
-
if (!packageJson) {
|
|
23
|
-
return [];
|
|
24
|
-
}
|
|
25
|
-
const { sideEffects } = packageJson;
|
|
26
|
-
if (sideEffects !== false && !Array.isArray(sideEffects)) {
|
|
27
|
-
return [];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
20
|
const packageSideEffectsCacheMap = new Map();
|
|
31
21
|
const readSideEffectInfoFromClosestPackage = (urlInfo) => {
|
|
32
22
|
const closestPackageDirectoryUrl = urlInfo.packageDirectoryUrl;
|