@jsenv/core 41.5.15 → 41.5.17

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.
@@ -12210,8 +12210,16 @@ const createBuildUrlsGenerator = ({
12210
12210
  // THAT bundle). They are told apart by the entry point they come from —
12211
12211
  // sharing the file would leave one entry importing exports the file on disk
12212
12212
  // does not have.
12213
+ //
12214
+ // A source file is shared between entry points only while they write it to
12215
+ // the same assets directory. Two entry points with their own directory each
12216
+ // get their own copy: the file lands where the entry point that references
12217
+ // it lands, so removing one entry point's directory takes nothing away from
12218
+ // another.
12213
12219
  const insideBuildDirectory = urlIsOrIsInsideOf(url, buildDirectoryUrl);
12214
- const key = insideBuildDirectory ? `${entryKey} ${url}` : url;
12220
+ const key = insideBuildDirectory
12221
+ ? `${entryKey} ${url}`
12222
+ : `${assetsDirectory} ${url}`;
12215
12223
  const buildUrlFromMap = buildUrlMap.get(key);
12216
12224
  if (buildUrlFromMap) {
12217
12225
  return buildUrlFromMap;
@@ -12243,7 +12251,7 @@ const createBuildUrlsGenerator = ({
12243
12251
  }
12244
12252
  if (urlInfo.type === "entry_build") {
12245
12253
  const buildUrl = new URL(urlInfo.filenameHint, buildDirectoryUrl).href;
12246
- associateBuildUrl(url, buildUrl);
12254
+ associateBuildUrl(key, buildUrl);
12247
12255
  return buildUrl;
12248
12256
  }
12249
12257
  if (
@@ -12261,7 +12269,7 @@ const createBuildUrlsGenerator = ({
12261
12269
  const urlObject = new URL(url);
12262
12270
  const { search } = urlObject;
12263
12271
  const buildUrl = `${buildDirectoryUrl}${directoryPath}${search}`;
12264
- associateBuildUrl(url, buildUrl);
12272
+ associateBuildUrl(key, buildUrl);
12265
12273
  return buildUrl;
12266
12274
  }
12267
12275
 
@@ -12276,7 +12284,7 @@ const createBuildUrlsGenerator = ({
12276
12284
  let { search, hash } = urlObject;
12277
12285
  const name = reserveName(directoryPath, getUrlName(url, urlInfo));
12278
12286
  const buildUrl = `${buildDirectoryUrl}${directoryPath}${name}${search}${hash}`;
12279
- associateBuildUrl(url, buildUrl);
12287
+ associateBuildUrl(key, buildUrl);
12280
12288
  return buildUrl;
12281
12289
  };
12282
12290
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "41.5.15",
3
+ "version": "41.5.17",
4
4
  "type": "module",
5
5
  "description": "Tool to develop, test and build js projects",
6
6
  "repository": {
@@ -44,7 +44,7 @@
44
44
  "scripts": {
45
45
  "build": "node --conditions=dev:jsenv ./scripts/build/build.mjs",
46
46
  "build:file_size": "node ./scripts/build/build_file_size.mjs --log",
47
- "build:packages": "npm run build --workspaces --if-present --conditions=developement",
47
+ "build:packages": "npm run build -- ./packages/",
48
48
  "database:install": "npx @jsenv/database install",
49
49
  "database:manage": "node --conditions=dev:jsenv ./packages/backend/database/src/cli/manage.js",
50
50
  "database:setup": "npm run database:setup --workspaces --if-present --conditions=dev:jsenv",
@@ -73,14 +73,14 @@
73
73
  "test:snapshot_clear": "npx @jsenv/filesystem clear **/tests/**/side_effects/"
74
74
  },
75
75
  "dependencies": {
76
- "@jsenv/ast": "6.10.3",
77
- "@jsenv/js-module-fallback": "1.6.7",
78
- "@jsenv/plugin-bundling": "2.10.27",
79
- "@jsenv/plugin-minification": "1.7.20",
80
- "@jsenv/plugin-supervisor": "1.8.22",
81
- "@jsenv/plugin-transpilation": "1.7.7",
76
+ "@jsenv/ast": "6.10.4",
77
+ "@jsenv/js-module-fallback": "1.6.8",
78
+ "@jsenv/plugin-bundling": "2.10.28",
79
+ "@jsenv/plugin-minification": "1.7.21",
80
+ "@jsenv/plugin-supervisor": "1.8.23",
81
+ "@jsenv/plugin-transpilation": "1.7.8",
82
82
  "@jsenv/server": "17.6.4",
83
- "@jsenv/sourcemap": "1.4.8",
83
+ "@jsenv/sourcemap": "1.4.9",
84
84
  "react-table": "7.8.0"
85
85
  },
86
86
  "devDependencies": {
@@ -59,8 +59,16 @@ export const createBuildUrlsGenerator = ({
59
59
  // THAT bundle). They are told apart by the entry point they come from —
60
60
  // sharing the file would leave one entry importing exports the file on disk
61
61
  // does not have.
62
+ //
63
+ // A source file is shared between entry points only while they write it to
64
+ // the same assets directory. Two entry points with their own directory each
65
+ // get their own copy: the file lands where the entry point that references
66
+ // it lands, so removing one entry point's directory takes nothing away from
67
+ // another.
62
68
  const insideBuildDirectory = urlIsOrIsInsideOf(url, buildDirectoryUrl);
63
- const key = insideBuildDirectory ? `${entryKey} ${url}` : url;
69
+ const key = insideBuildDirectory
70
+ ? `${entryKey} ${url}`
71
+ : `${assetsDirectory} ${url}`;
64
72
  const buildUrlFromMap = buildUrlMap.get(key);
65
73
  if (buildUrlFromMap) {
66
74
  return buildUrlFromMap;
@@ -92,7 +100,7 @@ export const createBuildUrlsGenerator = ({
92
100
  }
93
101
  if (urlInfo.type === "entry_build") {
94
102
  const buildUrl = new URL(urlInfo.filenameHint, buildDirectoryUrl).href;
95
- associateBuildUrl(url, buildUrl);
103
+ associateBuildUrl(key, buildUrl);
96
104
  return buildUrl;
97
105
  }
98
106
  if (
@@ -110,7 +118,7 @@ export const createBuildUrlsGenerator = ({
110
118
  const urlObject = new URL(url);
111
119
  const { search } = urlObject;
112
120
  const buildUrl = `${buildDirectoryUrl}${directoryPath}${search}`;
113
- associateBuildUrl(url, buildUrl);
121
+ associateBuildUrl(key, buildUrl);
114
122
  return buildUrl;
115
123
  }
116
124
 
@@ -125,7 +133,7 @@ export const createBuildUrlsGenerator = ({
125
133
  let { search, hash } = urlObject;
126
134
  const name = reserveName(directoryPath, getUrlName(url, urlInfo));
127
135
  const buildUrl = `${buildDirectoryUrl}${directoryPath}${name}${search}${hash}`;
128
- associateBuildUrl(url, buildUrl);
136
+ associateBuildUrl(key, buildUrl);
129
137
  return buildUrl;
130
138
  };
131
139