wesl-plugin 0.6.45 → 0.6.47
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/{WeslPlugin-D0IEnDmK.js → WeslPlugin-BhkB-CW-.js} +1 -68
- package/dist/plugins/astro.js +1 -1
- package/dist/plugins/esbuild.js +1 -1
- package/dist/plugins/farm.js +1 -1
- package/dist/plugins/nuxt.js +3 -3
- package/dist/plugins/rollup.js +1 -1
- package/dist/plugins/rspack.js +1 -1
- package/dist/plugins/vite.js +2 -2
- package/dist/plugins/webpack.js +2 -2
- package/dist/{vite-CccajS5p.js → vite-BqdMYd8l.js} +1 -1
- package/dist/{webpack-Duvcn8o1.js → webpack-D-jacRMO.js} +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as resolve } from "./import-meta-resolve-CUFqnZwT.js";
|
|
2
2
|
import path, { posix, win32 } from "node:path";
|
|
3
|
-
import { RecordResolver, WeslParseError,
|
|
3
|
+
import { RecordResolver, WeslParseError, filterMap, findUnboundIdents, npmNameVariations } from "wesl";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
import * as actualFS from "node:fs";
|
|
6
6
|
import { createUnplugin } from "unplugin";
|
|
@@ -5841,41 +5841,6 @@ const glob = Object.assign(glob_, {
|
|
|
5841
5841
|
});
|
|
5842
5842
|
glob.glob = glob;
|
|
5843
5843
|
|
|
5844
|
-
//#endregion
|
|
5845
|
-
//#region ../wesl-tooling/src/FindUnboundIdents.ts
|
|
5846
|
-
/**
|
|
5847
|
-
* Find unbound package references in library sources.
|
|
5848
|
-
*
|
|
5849
|
-
* Binds local references without following cross-package imports, revealing
|
|
5850
|
-
* which external packages are referenced but not resolved.
|
|
5851
|
-
*
|
|
5852
|
-
* @param resolver - Module resolver that supports batch operations
|
|
5853
|
-
* @returns Array of unbound module paths, each as an array of path segments
|
|
5854
|
-
* (e.g., [['foo', 'bar', 'baz'], ['other', 'pkg']])
|
|
5855
|
-
*/
|
|
5856
|
-
function findUnboundIdents(resolver) {
|
|
5857
|
-
const bindContext = {
|
|
5858
|
-
resolver,
|
|
5859
|
-
conditions: {},
|
|
5860
|
-
knownDecls: /* @__PURE__ */ new Set(),
|
|
5861
|
-
foundScopes: /* @__PURE__ */ new Set(),
|
|
5862
|
-
globalNames: /* @__PURE__ */ new Set(),
|
|
5863
|
-
globalStatements: /* @__PURE__ */ new Map(),
|
|
5864
|
-
mangler: minimalMangle,
|
|
5865
|
-
unbound: [],
|
|
5866
|
-
dontFollowDecls: true
|
|
5867
|
-
};
|
|
5868
|
-
for (const [_modulePath, ast] of resolver.allModules()) {
|
|
5869
|
-
const declEntries = findValidRootDecls(ast.rootScope, {}).map((d) => [d.originalName, d]);
|
|
5870
|
-
const liveDecls = {
|
|
5871
|
-
decls: new Map(declEntries),
|
|
5872
|
-
parent: null
|
|
5873
|
-
};
|
|
5874
|
-
bindIdentsRecursive(ast.rootScope, bindContext, liveDecls, true);
|
|
5875
|
-
}
|
|
5876
|
-
return bindContext.unbound;
|
|
5877
|
-
}
|
|
5878
|
-
|
|
5879
5844
|
//#endregion
|
|
5880
5845
|
//#region ../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/parser.js
|
|
5881
5846
|
var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/parser.js": ((exports, module) => {
|
|
@@ -9712,38 +9677,6 @@ async function findWeslToml(projectDir, specifiedToml) {
|
|
|
9712
9677
|
};
|
|
9713
9678
|
}
|
|
9714
9679
|
|
|
9715
|
-
//#endregion
|
|
9716
|
-
//#region ../wesl-tooling/src/PackageNameUtils.ts
|
|
9717
|
-
/** Generate npm package name variations from sanitized WESL identifier.
|
|
9718
|
-
*
|
|
9719
|
-
* Uses double-underscore encoding to distinguish scoped vs unscoped packages:
|
|
9720
|
-
* - Has __ → scoped package (try @scope/pkg variants)
|
|
9721
|
-
* - No __ → unscoped package (try pkg variants)
|
|
9722
|
-
*
|
|
9723
|
-
* Examples:
|
|
9724
|
-
* "lygia__shader_utils" → ["@lygia/shader_utils", "@lygia/shader-utils"]
|
|
9725
|
-
* "random_wgsl" → ["random_wgsl", "random-wgsl"]
|
|
9726
|
-
*/
|
|
9727
|
-
function* npmNameVariations(sanitizedPath) {
|
|
9728
|
-
const [pkg, sub] = breakAt(sanitizedPath, "/");
|
|
9729
|
-
let pkgName = pkg;
|
|
9730
|
-
let scopePrefix = "";
|
|
9731
|
-
if (pkg.includes("__")) {
|
|
9732
|
-
const [scope, ...rest] = pkg.split("__");
|
|
9733
|
-
pkgName = rest.join("__");
|
|
9734
|
-
scopePrefix = `@${scope}/`;
|
|
9735
|
-
}
|
|
9736
|
-
yield `${scopePrefix}${pkgName}${sub}`;
|
|
9737
|
-
yield `${scopePrefix}${pkgName.replaceAll("_", "-")}${sub}`;
|
|
9738
|
-
}
|
|
9739
|
-
/** Break string at first occurrence of delimiter.
|
|
9740
|
-
* @returns [before, after] where after includes the delimiter */
|
|
9741
|
-
function breakAt(str, delimiter) {
|
|
9742
|
-
const index = str.indexOf(delimiter);
|
|
9743
|
-
if (index === -1) return [str, ""];
|
|
9744
|
-
return [str.slice(0, index), str.slice(index)];
|
|
9745
|
-
}
|
|
9746
|
-
|
|
9747
9680
|
//#endregion
|
|
9748
9681
|
//#region ../wesl-tooling/src/NpmResolver.ts
|
|
9749
9682
|
/** Find longest resolvable npm subpath from WESL module path segments.
|
package/dist/plugins/astro.js
CHANGED
package/dist/plugins/esbuild.js
CHANGED
package/dist/plugins/farm.js
CHANGED
package/dist/plugins/nuxt.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../WeslPlugin-
|
|
1
|
+
import "../WeslPlugin-BhkB-CW-.js";
|
|
2
2
|
import "../import-meta-resolve-CUFqnZwT.js";
|
|
3
|
-
import { t as vite_default } from "../vite-
|
|
4
|
-
import { t as webpack_default } from "../webpack-
|
|
3
|
+
import { t as vite_default } from "../vite-BqdMYd8l.js";
|
|
4
|
+
import { t as webpack_default } from "../webpack-D-jacRMO.js";
|
|
5
5
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
6
6
|
import "@nuxt/schema";
|
|
7
7
|
|
package/dist/plugins/rollup.js
CHANGED
package/dist/plugins/rspack.js
CHANGED
package/dist/plugins/vite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../WeslPlugin-
|
|
1
|
+
import "../WeslPlugin-BhkB-CW-.js";
|
|
2
2
|
import "../import-meta-resolve-CUFqnZwT.js";
|
|
3
|
-
import { t as vite_default } from "../vite-
|
|
3
|
+
import { t as vite_default } from "../vite-BqdMYd8l.js";
|
|
4
4
|
|
|
5
5
|
export { vite_default as default };
|
package/dist/plugins/webpack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../WeslPlugin-
|
|
1
|
+
import "../WeslPlugin-BhkB-CW-.js";
|
|
2
2
|
import "../import-meta-resolve-CUFqnZwT.js";
|
|
3
|
-
import { t as webpack_default } from "../webpack-
|
|
3
|
+
import { t as webpack_default } from "../webpack-D-jacRMO.js";
|
|
4
4
|
|
|
5
5
|
export { webpack_default as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wesl-plugin",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.47",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"unplugin": "^2.3.5",
|
|
28
|
-
"wesl": "0.6.
|
|
28
|
+
"wesl": "0.6.47"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@nuxt/kit": "^3.17.6",
|