wesl-packager 0.6.43 → 0.6.45

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/bin/wesl-packager CHANGED
@@ -11182,9 +11182,11 @@ async function packageWgsl(args) {
11182
11182
  const edition = "unstable_2025_1";
11183
11183
  if (args.multiBundle) await writeMultiBundle(modules, name, edition, projectDir, outDir);
11184
11184
  else {
11185
- const deps = parseDependencies(modules, projectDir);
11185
+ const allDeps = parseDependencies(modules, projectDir);
11186
+ const sanitized = sanitizePackageName(name);
11187
+ const deps = filterSelfDeps(allDeps, sanitized);
11186
11188
  await writeJsBundle({
11187
- name: sanitizePackageName(name),
11189
+ name: sanitized,
11188
11190
  edition,
11189
11191
  modules
11190
11192
  }, deps, outDir);
@@ -11288,6 +11290,10 @@ function bundleToJsString(bundle, dependencies) {
11288
11290
  return jsonString.replace(": 99", dependenciesStr);
11289
11291
  } else return jsonString;
11290
11292
  }
11293
+ /** Filter out self-dependencies from the dependency list */
11294
+ function filterSelfDeps(deps, packageName) {
11295
+ return deps.filter((dep) => dep !== packageName && !dep.startsWith(`${packageName}/`));
11296
+ }
11291
11297
  /** parse and extract fields from package.json that we care about
11292
11298
  * (the name of the package) */
11293
11299
  async function loadPackageFields(pkgJsonPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wesl-packager",
3
- "version": "0.6.43",
3
+ "version": "0.6.45",
4
4
  "type": "module",
5
5
  "bin": "bin/wesl-packager",
6
6
  "files": [
@@ -11,7 +11,7 @@
11
11
  "@biomejs/js-api": "^1.0.0",
12
12
  "@biomejs/wasm-nodejs": "^2.0.6",
13
13
  "yargs": "^18.0.0",
14
- "wesl": "0.6.43"
14
+ "wesl": "0.6.45"
15
15
  },
16
16
  "devDependencies": {
17
17
  "dependent_package": "x",