wesl-plugin 0.6.1 → 0.6.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  weslPlugin
3
- } from "./chunk-UHGDZTJS.js";
3
+ } from "./chunk-LHNI4JI3.js";
4
4
 
5
5
  // src/plugins/webpack.ts
6
6
  import { createWebpackPlugin } from "unplugin";
@@ -1542,10 +1542,10 @@ minimatch.Minimatch = Minimatch;
1542
1542
  minimatch.escape = escape;
1543
1543
  minimatch.unescape = unescape;
1544
1544
 
1545
- // ../../node_modules/.pnpm/glob@11.0.1/node_modules/glob/dist/esm/glob.js
1545
+ // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/glob.js
1546
1546
  import { fileURLToPath as fileURLToPath2 } from "node:url";
1547
1547
 
1548
- // ../../node_modules/.pnpm/lru-cache@11.0.2/node_modules/lru-cache/dist/esm/index.js
1548
+ // ../../node_modules/.pnpm/lru-cache@11.1.0/node_modules/lru-cache/dist/esm/index.js
1549
1549
  var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
1550
1550
  var warned = /* @__PURE__ */ new Set();
1551
1551
  var PROCESS = typeof process === "object" && !!process ? process : {};
@@ -1631,6 +1631,7 @@ var LRUCache = class _LRUCache {
1631
1631
  #max;
1632
1632
  #maxSize;
1633
1633
  #dispose;
1634
+ #onInsert;
1634
1635
  #disposeAfter;
1635
1636
  #fetchMethod;
1636
1637
  #memoMethod;
@@ -1712,6 +1713,7 @@ var LRUCache = class _LRUCache {
1712
1713
  #hasDispose;
1713
1714
  #hasFetchMethod;
1714
1715
  #hasDisposeAfter;
1716
+ #hasOnInsert;
1715
1717
  /**
1716
1718
  * Do not call this method unless you need to inspect the
1717
1719
  * inner workings of the cache. If anything returned by this
@@ -1788,6 +1790,12 @@ var LRUCache = class _LRUCache {
1788
1790
  get dispose() {
1789
1791
  return this.#dispose;
1790
1792
  }
1793
+ /**
1794
+ * {@link LRUCache.OptionsBase.onInsert} (read-only)
1795
+ */
1796
+ get onInsert() {
1797
+ return this.#onInsert;
1798
+ }
1791
1799
  /**
1792
1800
  * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
1793
1801
  */
@@ -1795,7 +1803,7 @@ var LRUCache = class _LRUCache {
1795
1803
  return this.#disposeAfter;
1796
1804
  }
1797
1805
  constructor(options) {
1798
- const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
1806
+ const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, onInsert, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
1799
1807
  if (max !== 0 && !isPosInt(max)) {
1800
1808
  throw new TypeError("max option must be a nonnegative integer");
1801
1809
  }
@@ -1837,6 +1845,9 @@ var LRUCache = class _LRUCache {
1837
1845
  if (typeof dispose === "function") {
1838
1846
  this.#dispose = dispose;
1839
1847
  }
1848
+ if (typeof onInsert === "function") {
1849
+ this.#onInsert = onInsert;
1850
+ }
1840
1851
  if (typeof disposeAfter === "function") {
1841
1852
  this.#disposeAfter = disposeAfter;
1842
1853
  this.#disposed = [];
@@ -1845,6 +1856,7 @@ var LRUCache = class _LRUCache {
1845
1856
  this.#disposed = void 0;
1846
1857
  }
1847
1858
  this.#hasDispose = !!this.#dispose;
1859
+ this.#hasOnInsert = !!this.#onInsert;
1848
1860
  this.#hasDisposeAfter = !!this.#disposeAfter;
1849
1861
  this.noDisposeOnSet = !!noDisposeOnSet;
1850
1862
  this.noUpdateTTL = !!noUpdateTTL;
@@ -2358,6 +2370,9 @@ var LRUCache = class _LRUCache {
2358
2370
  if (status)
2359
2371
  status.set = "add";
2360
2372
  noUpdateTTL = false;
2373
+ if (this.#hasOnInsert) {
2374
+ this.#onInsert?.(v, k, "add");
2375
+ }
2361
2376
  } else {
2362
2377
  this.#moveToTail(index);
2363
2378
  const oldVal = this.#valList[index];
@@ -2393,6 +2408,9 @@ var LRUCache = class _LRUCache {
2393
2408
  } else if (status) {
2394
2409
  status.set = "update";
2395
2410
  }
2411
+ if (this.#hasOnInsert) {
2412
+ this.onInsert?.(v, k, v === oldVal ? "update" : "replace");
2413
+ }
2396
2414
  }
2397
2415
  if (ttl !== 0 && !this.#ttls) {
2398
2416
  this.#initializeTTLTracking();
@@ -5525,7 +5543,7 @@ var PathScurryDarwin = class extends PathScurryPosix {
5525
5543
  var Path = process.platform === "win32" ? PathWin32 : PathPosix;
5526
5544
  var PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
5527
5545
 
5528
- // ../../node_modules/.pnpm/glob@11.0.1/node_modules/glob/dist/esm/pattern.js
5546
+ // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/pattern.js
5529
5547
  var isPatternList = (pl) => pl.length >= 1;
5530
5548
  var isGlobList = (gl) => gl.length >= 1;
5531
5549
  var Pattern = class _Pattern {
@@ -5690,7 +5708,7 @@ var Pattern = class _Pattern {
5690
5708
  }
5691
5709
  };
5692
5710
 
5693
- // ../../node_modules/.pnpm/glob@11.0.1/node_modules/glob/dist/esm/ignore.js
5711
+ // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/ignore.js
5694
5712
  var defaultPlatform2 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
5695
5713
  var Ignore = class {
5696
5714
  relative;
@@ -5777,7 +5795,7 @@ var Ignore = class {
5777
5795
  }
5778
5796
  };
5779
5797
 
5780
- // ../../node_modules/.pnpm/glob@11.0.1/node_modules/glob/dist/esm/processor.js
5798
+ // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/processor.js
5781
5799
  var HasWalkedCache = class _HasWalkedCache {
5782
5800
  store;
5783
5801
  constructor(store = /* @__PURE__ */ new Map()) {
@@ -5998,7 +6016,7 @@ var Processor = class _Processor {
5998
6016
  }
5999
6017
  };
6000
6018
 
6001
- // ../../node_modules/.pnpm/glob@11.0.1/node_modules/glob/dist/esm/walker.js
6019
+ // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/walker.js
6002
6020
  var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new Ignore([ignore], opts) : Array.isArray(ignore) ? new Ignore(ignore, opts) : ignore;
6003
6021
  var GlobUtil = class {
6004
6022
  path;
@@ -6325,7 +6343,7 @@ var GlobStream = class extends GlobUtil {
6325
6343
  }
6326
6344
  };
6327
6345
 
6328
- // ../../node_modules/.pnpm/glob@11.0.1/node_modules/glob/dist/esm/glob.js
6346
+ // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/glob.js
6329
6347
  var defaultPlatform3 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
6330
6348
  var Glob = class {
6331
6349
  absolute;
@@ -6525,7 +6543,7 @@ var Glob = class {
6525
6543
  }
6526
6544
  };
6527
6545
 
6528
- // ../../node_modules/.pnpm/glob@11.0.1/node_modules/glob/dist/esm/has-magic.js
6546
+ // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/has-magic.js
6529
6547
  var hasMagic = (pattern, options = {}) => {
6530
6548
  if (!Array.isArray(pattern)) {
6531
6549
  pattern = [pattern];
@@ -6537,7 +6555,7 @@ var hasMagic = (pattern, options = {}) => {
6537
6555
  return false;
6538
6556
  };
6539
6557
 
6540
- // ../../node_modules/.pnpm/glob@11.0.1/node_modules/glob/dist/esm/index.js
6558
+ // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/index.js
6541
6559
  function globStreamSync(pattern, options = {}) {
6542
6560
  return new Glob(pattern, options).streamSync();
6543
6561
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  weslPlugin
3
- } from "./chunk-UHGDZTJS.js";
3
+ } from "./chunk-LHNI4JI3.js";
4
4
 
5
5
  // src/plugins/vite.ts
6
6
  import { createVitePlugin } from "unplugin";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  WeslPlugin_default
3
- } from "../chunk-UHGDZTJS.js";
3
+ } from "../chunk-LHNI4JI3.js";
4
4
  import "../chunk-JSBRDJBE.js";
5
5
 
6
6
  // src/plugins/astro.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  weslPlugin
3
- } from "../chunk-UHGDZTJS.js";
3
+ } from "../chunk-LHNI4JI3.js";
4
4
  import "../chunk-JSBRDJBE.js";
5
5
 
6
6
  // src/plugins/esbuild.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  weslPlugin
3
- } from "../chunk-UHGDZTJS.js";
3
+ } from "../chunk-LHNI4JI3.js";
4
4
  import "../chunk-JSBRDJBE.js";
5
5
 
6
6
  // src/plugins/farm.ts
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  webpack_default
3
- } from "../chunk-BGLULJCG.js";
3
+ } from "../chunk-3YZCYXZ7.js";
4
4
  import {
5
5
  vite_default
6
- } from "../chunk-PZE7YGFK.js";
7
- import "../chunk-UHGDZTJS.js";
6
+ } from "../chunk-ZK6IKQOJ.js";
7
+ import "../chunk-LHNI4JI3.js";
8
8
  import "../chunk-JSBRDJBE.js";
9
9
 
10
10
  // src/plugins/nuxt.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  weslPlugin
3
- } from "../chunk-UHGDZTJS.js";
3
+ } from "../chunk-LHNI4JI3.js";
4
4
  import "../chunk-JSBRDJBE.js";
5
5
 
6
6
  // src/plugins/rollup.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  weslPlugin
3
- } from "../chunk-UHGDZTJS.js";
3
+ } from "../chunk-LHNI4JI3.js";
4
4
  import "../chunk-JSBRDJBE.js";
5
5
 
6
6
  // src/plugins/rspack.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  vite_default
3
- } from "../chunk-PZE7YGFK.js";
4
- import "../chunk-UHGDZTJS.js";
3
+ } from "../chunk-ZK6IKQOJ.js";
4
+ import "../chunk-LHNI4JI3.js";
5
5
  import "../chunk-JSBRDJBE.js";
6
6
  export {
7
7
  vite_default as default
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  webpack_default
3
- } from "../chunk-BGLULJCG.js";
4
- import "../chunk-UHGDZTJS.js";
3
+ } from "../chunk-3YZCYXZ7.js";
4
+ import "../chunk-LHNI4JI3.js";
5
5
  import "../chunk-JSBRDJBE.js";
6
6
  export {
7
7
  webpack_default as default
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "wesl-plugin",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "dependencies": {
6
6
  "import-meta-resolve": "^4.1.0",
7
7
  "toml": "^3.0.0",
8
- "unplugin": "^2.2.0",
9
- "wesl": "0.6.1"
8
+ "unplugin": "^2.3.2",
9
+ "wesl": "0.6.2"
10
10
  },
11
11
  "devDependencies": {
12
- "@nuxt/kit": "^3.16.0",
13
- "@nuxt/schema": "^3.16.0",
12
+ "@nuxt/kit": "^3.17.2",
13
+ "@nuxt/schema": "^3.17.2",
14
14
  "bumpp": "^10.1.0",
15
15
  "chalk": "^5.4.1",
16
- "nodemon": "^3.1.9",
17
- "rollup": "^4.35.0",
16
+ "nodemon": "^3.1.10",
17
+ "rollup": "^4.40.2",
18
18
  "tsup": "^8.4.0",
19
- "webpack": "^5.98.0"
19
+ "webpack": "^5.99.8"
20
20
  },
21
21
  "description": "",
22
22
  "repository": "github:wgsl-tooling-wg/wesl-js",