@jsenv/core 41.2.0 → 41.2.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.
@@ -6102,20 +6102,22 @@ const applyLegacySubpathResolution = (packageSubpath, resolutionContext) => {
6102
6102
 
6103
6103
  const applyLegacyMainResolution = (packageSubpath, resolutionContext) => {
6104
6104
  const { conditions, packageDirectoryUrl, packageJson } = resolutionContext;
6105
- for (const condition of conditions) {
6106
- const conditionResolver = mainLegacyResolvers[condition];
6107
- if (!conditionResolver) {
6108
- continue;
6109
- }
6110
- const resolved = conditionResolver(resolutionContext);
6111
- if (resolved) {
6112
- return createResolutionResult({
6113
- type: resolved.type,
6114
- isMain: resolved.isMain,
6115
- packageDirectoryUrl,
6116
- packageJson,
6117
- url: new URL(resolved.path, packageDirectoryUrl).href,
6118
- });
6105
+ if (packageJson) {
6106
+ for (const condition of conditions) {
6107
+ const conditionResolver = mainLegacyResolvers[condition];
6108
+ if (!conditionResolver) {
6109
+ continue;
6110
+ }
6111
+ const resolved = conditionResolver(resolutionContext);
6112
+ if (resolved) {
6113
+ return createResolutionResult({
6114
+ type: resolved.type,
6115
+ isMain: resolved.isMain,
6116
+ packageDirectoryUrl,
6117
+ packageJson,
6118
+ url: new URL(resolved.path, packageDirectoryUrl).href,
6119
+ });
6120
+ }
6119
6121
  }
6120
6122
  }
6121
6123
  return createResolutionResult({
@@ -5568,20 +5568,22 @@ const applyLegacySubpathResolution = (packageSubpath, resolutionContext) => {
5568
5568
 
5569
5569
  const applyLegacyMainResolution = (packageSubpath, resolutionContext) => {
5570
5570
  const { conditions, packageDirectoryUrl, packageJson } = resolutionContext;
5571
- for (const condition of conditions) {
5572
- const conditionResolver = mainLegacyResolvers[condition];
5573
- if (!conditionResolver) {
5574
- continue;
5575
- }
5576
- const resolved = conditionResolver(resolutionContext);
5577
- if (resolved) {
5578
- return createResolutionResult({
5579
- type: resolved.type,
5580
- isMain: resolved.isMain,
5581
- packageDirectoryUrl,
5582
- packageJson,
5583
- url: new URL(resolved.path, packageDirectoryUrl).href,
5584
- });
5571
+ if (packageJson) {
5572
+ for (const condition of conditions) {
5573
+ const conditionResolver = mainLegacyResolvers[condition];
5574
+ if (!conditionResolver) {
5575
+ continue;
5576
+ }
5577
+ const resolved = conditionResolver(resolutionContext);
5578
+ if (resolved) {
5579
+ return createResolutionResult({
5580
+ type: resolved.type,
5581
+ isMain: resolved.isMain,
5582
+ packageDirectoryUrl,
5583
+ packageJson,
5584
+ url: new URL(resolved.path, packageDirectoryUrl).href,
5585
+ });
5586
+ }
5585
5587
  }
5586
5588
  }
5587
5589
  return createResolutionResult({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "41.2.0",
3
+ "version": "41.2.2",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,7 +59,7 @@
59
59
  "md:build": "node ./docs/build.js",
60
60
  "monorepo:node_modules_clear": "npx @jsenv/filesystem clear **/node_modules/",
61
61
  "monorepo:publish": "node ./scripts/monorepo/publish_packages.mjs",
62
- "monorepo:sync_packages_versions": "node ./scripts/monorepo/sync_packages_versions.mjs",
62
+ "monorepo:sync_versions": "node ./scripts/monorepo/sync_packages_versions.mjs",
63
63
  "monorepo:upgrade_versions": "node ./scripts/monorepo/upgrade_external_versions.mjs",
64
64
  "oto:start": "npm run start -w oto",
65
65
  "performances": "node --expose-gc ./scripts/performance/generate_performance_report.mjs --log --once",
@@ -74,12 +74,12 @@
74
74
  "test:snapshot_clear": "npx @jsenv/filesystem clear **/tests/**/side_effects/"
75
75
  },
76
76
  "dependencies": {
77
- "@jsenv/ast": "6.7.21",
78
- "@jsenv/js-module-fallback": "1.4.29",
79
- "@jsenv/plugin-bundling": "2.10.9",
77
+ "@jsenv/ast": "6.8.0",
78
+ "@jsenv/js-module-fallback": "1.4.30",
79
+ "@jsenv/plugin-bundling": "2.10.10",
80
80
  "@jsenv/plugin-minification": "1.7.3",
81
- "@jsenv/plugin-supervisor": "1.8.0",
82
- "@jsenv/plugin-transpilation": "1.5.71",
81
+ "@jsenv/plugin-supervisor": "1.8.1",
82
+ "@jsenv/plugin-transpilation": "1.5.72",
83
83
  "@jsenv/server": "17.1.1",
84
84
  "@jsenv/sourcemap": "1.3.17",
85
85
  "react-table": "7.8.0"