@animus-ui/next-plugin 0.1.46 → 0.1.48

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/index.cjs CHANGED
@@ -11,11 +11,11 @@ let url = require("url");
11
11
  * trailing slash, a symlink and the filesystem's own spelling, else by
12
12
  * device and inode. */
13
13
  function sameDirectory(a, b) {
14
- const real = (path$12) => {
14
+ const real = (path$2) => {
15
15
  try {
16
- return fs.realpathSync.native(path$12);
16
+ return fs.realpathSync.native(path$2);
17
17
  } catch {
18
- return (0, path.resolve)(path$12);
18
+ return (0, path.resolve)(path$2);
19
19
  }
20
20
  };
21
21
  if (real(a) === real(b)) return true;
@@ -94,25 +94,25 @@ function globSource(glob) {
94
94
  }
95
95
  /** What `ignored` ignores, as Watchpack decides it; nothing when unset. */
96
96
  function ignoredMatcher(ignored) {
97
- const slashed = (path$6) => path$6.replace(/\\/g, "/");
97
+ const slashed = (path) => path.replace(/\\/g, "/");
98
98
  if (ignored === void 0 || ignored === null) return () => false;
99
- if (isWatchIgnoreMatcher(ignored)) return (path$7) => Boolean(ignored(path$7));
100
- if (ignored instanceof RegExp) return (path$8) => ignored.test(slashed(path$8));
99
+ if (isWatchIgnoreMatcher(ignored)) return (path) => Boolean(ignored(path));
100
+ if (ignored instanceof RegExp) return (path) => ignored.test(slashed(path));
101
101
  const sources = (isWatchIgnoreString(ignored) ? [ignored] : ignored).map((entry) => entry instanceof RegExp ? entry.source : entry.length > 0 ? globSource(entry) : null).filter((source) => source !== null);
102
102
  if (sources.length === 0) return () => false;
103
103
  const pattern = new RegExp(sources.join("|"));
104
- return (path$9) => pattern.test(slashed(path$9));
104
+ return (path) => pattern.test(slashed(path));
105
105
  }
106
106
  /** Windows paths compare without case, as `path.win32.relative` does. */
107
- const comparable = process.platform === "win32" ? (path$10) => path$10.toLowerCase() : (path$11) => path$11;
107
+ const comparable = process.platform === "win32" ? (path) => path.toLowerCase() : (path) => path;
108
108
  /** Whether a path is one of `directories` or lies under one where a kit's
109
109
  * sources can live: never in the kit's own `node_modules` or another path
110
110
  * ingestion excludes, which stay as the host decides. A prefix test:
111
111
  * webpack's watcher asks for every path it watches. */
112
112
  function withinDirectories(directories) {
113
113
  const prefixes = directories.map((dir) => comparable(dir.endsWith(path.sep) ? dir : dir + path.sep)).sort((a, b) => b.length - a.length);
114
- return (path$5) => {
115
- const key = comparable(path$5) + path.sep;
114
+ return (path$1) => {
115
+ const key = comparable(path$1) + path.sep;
116
116
  const prefix = prefixes.find((candidate) => key.startsWith(candidate));
117
117
  return prefix !== void 0 && !(0, _animus_ui_extract_pipeline.isExcludedPackageRelativePath)(key.slice(prefix.length));
118
118
  };
@@ -193,10 +193,10 @@ var AnimusWebpackPlugin = class {
193
193
  }
194
194
  return epochPath;
195
195
  };
196
- return (path$2) => {
197
- if (path$2 === epoch()) return true;
198
- if (this.registered.files.has(path$2) || this.registered.directories(path$2)) return false;
199
- return hostIgnores(path$2) && !this.alsoWatched.some((watches) => watches(path$2));
196
+ return (path) => {
197
+ if (path === epoch()) return true;
198
+ if (this.registered.files.has(path) || this.registered.directories(path)) return false;
199
+ return hostIgnores(path) && !this.alsoWatched.some((watches) => watches(path));
200
200
  };
201
201
  }
202
202
  /** Webpack's export conditions select the system's kit files as they
@@ -275,9 +275,9 @@ var AnimusWebpackPlugin = class {
275
275
  files: /* @__PURE__ */ new Set([...plan.files, ...plan.missing]),
276
276
  directories: withinDirectories(plan.directories)
277
277
  };
278
- for (const path$3 of plan.files) if ((0, fs.existsSync)(path$3)) compilation.fileDependencies.add(path$3);
279
- else compilation.missingDependencies.add(path$3);
280
- for (const path$4 of plan.missing) compilation.missingDependencies.add(path$4);
278
+ for (const path of plan.files) if ((0, fs.existsSync)(path)) compilation.fileDependencies.add(path);
279
+ else compilation.missingDependencies.add(path);
280
+ for (const path of plan.missing) compilation.missingDependencies.add(path);
281
281
  for (const root of plan.directories) compilation.contextDependencies.add(root);
282
282
  };
283
283
  registerSystemDependencies();
@@ -538,7 +538,7 @@ function withAnimus(options) {
538
538
  if (options.quarantine && vendorOrder && context.isServer !== true) {
539
539
  const gate = quarantinePlugin(options.quarantine, vendorOrder, stubCssPath);
540
540
  config.plugins.push(gate);
541
- plugin.watchAlso((path$1) => gate.watches(path$1));
541
+ plugin.watchAlso((path) => gate.watches(path));
542
542
  }
543
543
  const DefinePlugin = context.webpack?.DefinePlugin;
544
544
  if (DefinePlugin) config.plugins.push(new DefinePlugin({ __ANIMUS_DEV__: JSON.stringify(mode === "development") }));
@@ -48,9 +48,9 @@ function __resetTurbopackLoaderStateForTests() {
48
48
  hydrations.clear();
49
49
  epochSeenPaths.clear();
50
50
  }
51
- function readFileOrNull(path$1) {
51
+ function readFileOrNull(path) {
52
52
  try {
53
- return fsImpl.readFileSync(path$1, "utf-8");
53
+ return fsImpl.readFileSync(path, "utf-8");
54
54
  } catch {
55
55
  return null;
56
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/next-plugin",
3
- "version": "0.1.46",
3
+ "version": "0.1.48",
4
4
  "description": "Animus static CSS extraction for Next.js (webpack)",
5
5
  "keywords": [
6
6
  "animus",
@@ -44,14 +44,14 @@
44
44
  "compile": "bun check"
45
45
  },
46
46
  "dependencies": {
47
- "@animus-ui/extract": "0.1.46"
47
+ "@animus-ui/extract": "0.1.48"
48
48
  },
49
49
  "devDependencies": {
50
- "@animus-ui/assertions": "0.1.46",
51
- "@animus-ui/layergate": "0.1.46"
50
+ "@animus-ui/assertions": "0.1.48",
51
+ "@animus-ui/layergate": "0.1.48"
52
52
  },
53
53
  "peerDependencies": {
54
- "@animus-ui/layergate": "0.1.46",
54
+ "@animus-ui/layergate": "0.1.48",
55
55
  "next": ">=15 <17",
56
56
  "webpack": ">=5 <6"
57
57
  },