@jsenv/core 41.4.14 → 41.4.15
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
|
@@ -6089,9 +6089,15 @@ const createNodeEsmResolver = ({
|
|
|
6089
6089
|
}
|
|
6090
6090
|
}
|
|
6091
6091
|
version_relationship: {
|
|
6092
|
-
const
|
|
6092
|
+
const closestPackageJson = packageDirectory.read(
|
|
6093
6093
|
closestPackageDirectoryUrl,
|
|
6094
|
-
)
|
|
6094
|
+
);
|
|
6095
|
+
if (!closestPackageJson) {
|
|
6096
|
+
// package.json can be momentarily missing while a package manager
|
|
6097
|
+
// is installing/updating that package (npm install running in watch mode)
|
|
6098
|
+
break version_relationship;
|
|
6099
|
+
}
|
|
6100
|
+
const packageVersion = closestPackageJson.version;
|
|
6095
6101
|
if (!packageVersion) {
|
|
6096
6102
|
// package version can be null, see https://github.com/babel/babel/blob/2ce56e832c2dd7a7ed92c89028ba929f874c2f5c/packages/babel-runtime/helpers/esm/package.json#L2
|
|
6097
6103
|
break version_relationship;
|
|
@@ -2805,9 +2805,15 @@ const createNodeEsmResolver = ({
|
|
|
2805
2805
|
}
|
|
2806
2806
|
}
|
|
2807
2807
|
version_relationship: {
|
|
2808
|
-
const
|
|
2808
|
+
const closestPackageJson = packageDirectory.read(
|
|
2809
2809
|
closestPackageDirectoryUrl,
|
|
2810
|
-
)
|
|
2810
|
+
);
|
|
2811
|
+
if (!closestPackageJson) {
|
|
2812
|
+
// package.json can be momentarily missing while a package manager
|
|
2813
|
+
// is installing/updating that package (npm install running in watch mode)
|
|
2814
|
+
break version_relationship;
|
|
2815
|
+
}
|
|
2816
|
+
const packageVersion = closestPackageJson.version;
|
|
2811
2817
|
if (!packageVersion) {
|
|
2812
2818
|
// package version can be null, see https://github.com/babel/babel/blob/2ce56e832c2dd7a7ed92c89028ba929f874c2f5c/packages/babel-runtime/helpers/esm/package.json#L2
|
|
2813
2819
|
break version_relationship;
|
package/package.json
CHANGED
|
@@ -154,9 +154,15 @@ export const createNodeEsmResolver = ({
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
version_relationship: {
|
|
157
|
-
const
|
|
157
|
+
const closestPackageJson = packageDirectory.read(
|
|
158
158
|
closestPackageDirectoryUrl,
|
|
159
|
-
)
|
|
159
|
+
);
|
|
160
|
+
if (!closestPackageJson) {
|
|
161
|
+
// package.json can be momentarily missing while a package manager
|
|
162
|
+
// is installing/updating that package (npm install running in watch mode)
|
|
163
|
+
break version_relationship;
|
|
164
|
+
}
|
|
165
|
+
const packageVersion = closestPackageJson.version;
|
|
160
166
|
if (!packageVersion) {
|
|
161
167
|
// package version can be null, see https://github.com/babel/babel/blob/2ce56e832c2dd7a7ed92c89028ba929f874c2f5c/packages/babel-runtime/helpers/esm/package.json#L2
|
|
162
168
|
break version_relationship;
|