@csszyx/unplugin 0.16.0 → 0.17.0

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.
Files changed (42) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs +7 -4
  3. package/dist/index.d.cts +2 -2
  4. package/dist/index.d.mts +2 -2
  5. package/dist/index.mjs +6 -4
  6. package/dist/jest-transform.cjs +186 -0
  7. package/dist/jest-transform.d.cts +112 -0
  8. package/dist/jest-transform.d.mts +110 -0
  9. package/dist/jest-transform.mjs +175 -0
  10. package/dist/next-prebuild.cjs +6 -5
  11. package/dist/next-prebuild.mjs +5 -4
  12. package/dist/next-turbo-loader.cjs +10 -8
  13. package/dist/next-turbo-loader.mjs +7 -5
  14. package/dist/next-watcher.cjs +3 -2
  15. package/dist/next-watcher.mjs +3 -2
  16. package/dist/shared/{unplugin.J6ue_lRJ.cjs → unplugin.2qOISpzl.cjs} +1 -114
  17. package/dist/shared/{unplugin.C-oQU1jl.mjs → unplugin.2uf-U76p.mjs} +1 -1
  18. package/dist/shared/{unplugin.Ceq-N4jI.mjs → unplugin.995yC_cN.mjs} +2 -110
  19. package/dist/shared/{unplugin.D3yBoTHP.cjs → unplugin.9zs6T4Gf.cjs} +75 -66
  20. package/dist/shared/{unplugin.PKo7wFzu.d.cts → unplugin.BO2_hyS3.d.cts} +38 -5
  21. package/dist/shared/{unplugin.DH_ij6cf.mjs → unplugin.Ba3O1r8M.mjs} +2 -6
  22. package/dist/shared/unplugin.BqKLlo1h.cjs +8 -0
  23. package/dist/shared/{unplugin.Vn9x8SBP.mjs → unplugin.C3bgc29e.mjs} +3 -2
  24. package/dist/shared/{unplugin.Dx0ngYWw.mjs → unplugin.Cs4H9z9v.mjs} +48 -40
  25. package/dist/shared/{unplugin.BLptVbUe.mjs → unplugin.DPSQP5XG.mjs} +1 -1
  26. package/dist/shared/{unplugin.DDSWQJYX.cjs → unplugin.DS6CFjim.cjs} +3 -8
  27. package/dist/shared/{unplugin.gksolKh2.cjs → unplugin.DXzIP7lP.cjs} +5 -4
  28. package/dist/shared/unplugin.DcXM9sq5.mjs +109 -0
  29. package/dist/shared/unplugin.Defu9wGh.cjs +115 -0
  30. package/dist/shared/{unplugin.Bu2rzRtv.d.mts → unplugin.DptK3pl4.d.mts} +38 -5
  31. package/dist/shared/{unplugin.BzF0V2kw.cjs → unplugin.YcnV3Izb.cjs} +6 -6
  32. package/dist/shared/{unplugin.BWnmKv07.cjs → unplugin.alhYXymJ.cjs} +1 -1
  33. package/dist/shared/unplugin.wMeicb6E.mjs +6 -0
  34. package/dist/vite.cjs +6 -4
  35. package/dist/vite.d.cts +2 -2
  36. package/dist/vite.d.mts +1 -1
  37. package/dist/vite.mjs +6 -4
  38. package/dist/webpack.cjs +6 -4
  39. package/dist/webpack.d.cts +1 -2
  40. package/dist/webpack.d.mts +1 -1
  41. package/dist/webpack.mjs +6 -4
  42. package/package.json +19 -9
@@ -2,7 +2,7 @@
2
2
 
3
3
  const path = require('node:path');
4
4
  const compiler = require('@csszyx/compiler');
5
- const safelistSource = require('./unplugin.DDSWQJYX.cjs');
5
+ const pathNormalization = require('./unplugin.BqKLlo1h.cjs');
6
6
  const fs = require('node:fs');
7
7
  const node_crypto = require('node:crypto');
8
8
 
@@ -111,12 +111,12 @@ function aliasedSpecifierBases(specifier, aliases) {
111
111
  continue;
112
112
  }
113
113
  if (!specifier.startsWith(alias.find)) continue;
114
- bases.push(safelistSource.normalizePathSeparators(alias.replacement + specifier.slice(alias.find.length)));
114
+ bases.push(pathNormalization.normalizePathSeparators(alias.replacement + specifier.slice(alias.find.length)));
115
115
  }
116
116
  return bases;
117
117
  }
118
118
  function absolute(directory, target) {
119
- const resolved = safelistSource.normalizePathSeparators(path__namespace.resolve(directory, target));
119
+ const resolved = pathNormalization.normalizePathSeparators(path__namespace.resolve(directory, target));
120
120
  const declaredTrailingSlash = target.endsWith("/") || target.endsWith("\\");
121
121
  return declaredTrailingSlash && !resolved.endsWith("/") ? `${resolved}/` : resolved;
122
122
  }
@@ -185,7 +185,7 @@ function recordSzObjectRegistryFile(registry, filePath, content) {
185
185
  );
186
186
  }
187
187
  function replaceEntriesOfKind(registry, filePath, kind, entries) {
188
- const key = safelistSource.normalizePathSeparators(filePath);
188
+ const key = pathNormalization.normalizePathSeparators(filePath);
189
189
  const byName = emptyNameIndex();
190
190
  for (const [name, recorded] of Object.entries(registry.get(key) ?? {})) {
191
191
  if (recorded.kind !== kind) byName[name] = recorded;
@@ -207,7 +207,7 @@ const EMITTED_EXTENSION_SOURCES = [
207
207
  [".cjs", [".cts"]]
208
208
  ];
209
209
  function recordCrossModuleForwards(index, filePath, content) {
210
- const key = safelistSource.normalizePathSeparators(filePath);
210
+ const key = pathNormalization.normalizePathSeparators(filePath);
211
211
  const forwards = compiler.extractCrossModuleForwards(content, filePath);
212
212
  if (forwards.length === 0) index.delete(key);
213
213
  else index.set(key, forwards);
@@ -317,7 +317,7 @@ function importedSpecifiersIn(source) {
317
317
  }
318
318
  function specifierBases(specifier, directory, aliases) {
319
319
  if (specifier.startsWith(".")) {
320
- return [safelistSource.normalizePathSeparators(path__namespace.resolve(directory, specifier))];
320
+ return [pathNormalization.normalizePathSeparators(path__namespace.resolve(directory, specifier))];
321
321
  }
322
322
  return aliasedSpecifierBases(specifier, aliases);
323
323
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  const path = require('node:path');
4
4
  const fs = require('node:fs');
5
- const safelistSource = require('./unplugin.DDSWQJYX.cjs');
5
+ const safelistSource = require('./unplugin.DS6CFjim.cjs');
6
6
  const node_crypto = require('node:crypto');
7
7
  const node_os = require('node:os');
8
8
  const lockfile = require('proper-lockfile');
@@ -0,0 +1,6 @@
1
+ const WINDOWS_PATH_SEPARATOR = String.fromCodePoint(92);
2
+ function normalizePathSeparators(value) {
3
+ return value.split(WINDOWS_PATH_SEPARATOR).join("/");
4
+ }
5
+
6
+ export { normalizePathSeparators as n };
package/dist/vite.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const unplugin = require('./shared/unplugin.D3yBoTHP.cjs');
5
+ const unplugin = require('./shared/unplugin.9zs6T4Gf.cjs');
6
6
  require('node:crypto');
7
7
  require('node:fs');
8
8
  require('node:module');
@@ -16,12 +16,14 @@ require('@csszyx/svelte-adapter');
16
16
  require('@csszyx/types');
17
17
  require('@csszyx/vue-adapter');
18
18
  require('unplugin');
19
- require('./shared/unplugin.DDSWQJYX.cjs');
20
- require('./shared/unplugin.BzF0V2kw.cjs');
19
+ require('./shared/unplugin.DS6CFjim.cjs');
20
+ require('./shared/unplugin.BqKLlo1h.cjs');
21
+ require('./shared/unplugin.YcnV3Izb.cjs');
21
22
  require('./css-mangler.cjs');
22
23
  require('postcss');
23
24
  require('postcss-selector-parser');
24
- require('./shared/unplugin.J6ue_lRJ.cjs');
25
+ require('./shared/unplugin.Defu9wGh.cjs');
26
+ require('./shared/unplugin.2qOISpzl.cjs');
25
27
  require('node:zlib');
26
28
  require('postcss-value-parser');
27
29
 
package/dist/vite.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { ap } from './shared/unplugin.PKo7wFzu.cjs';
2
- export = ap;
1
+ import { aq } from './shared/unplugin.BO2_hyS3.cjs';
2
+ export = aq;
3
3
  import '@csszyx/compiler';
4
4
  import '@csszyx/types';
5
5
  import 'esbuild';
package/dist/vite.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { ap as default } from './shared/unplugin.Bu2rzRtv.mjs';
1
+ export { aq as default } from './shared/unplugin.DptK3pl4.mjs';
2
2
  import '@csszyx/compiler';
3
3
  import '@csszyx/types';
4
4
  import 'esbuild';
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { a2 as default } from './shared/unplugin.Dx0ngYWw.mjs';
1
+ export { a3 as default } from './shared/unplugin.Cs4H9z9v.mjs';
2
2
  import 'node:crypto';
3
3
  import 'node:fs';
4
4
  import 'node:module';
@@ -12,11 +12,13 @@ import '@csszyx/svelte-adapter';
12
12
  import '@csszyx/types';
13
13
  import '@csszyx/vue-adapter';
14
14
  import 'unplugin';
15
- import './shared/unplugin.DH_ij6cf.mjs';
16
- import './shared/unplugin.C-oQU1jl.mjs';
15
+ import './shared/unplugin.Ba3O1r8M.mjs';
16
+ import './shared/unplugin.wMeicb6E.mjs';
17
+ import './shared/unplugin.2uf-U76p.mjs';
17
18
  import './css-mangler.mjs';
18
19
  import 'postcss';
19
20
  import 'postcss-selector-parser';
20
- import './shared/unplugin.Ceq-N4jI.mjs';
21
+ import './shared/unplugin.DcXM9sq5.mjs';
22
+ import './shared/unplugin.995yC_cN.mjs';
21
23
  import 'node:zlib';
22
24
  import 'postcss-value-parser';
package/dist/webpack.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const unplugin = require('./shared/unplugin.D3yBoTHP.cjs');
5
+ const unplugin = require('./shared/unplugin.9zs6T4Gf.cjs');
6
6
  require('node:crypto');
7
7
  require('node:fs');
8
8
  require('node:module');
@@ -16,12 +16,14 @@ require('@csszyx/svelte-adapter');
16
16
  require('@csszyx/types');
17
17
  require('@csszyx/vue-adapter');
18
18
  require('unplugin');
19
- require('./shared/unplugin.DDSWQJYX.cjs');
20
- require('./shared/unplugin.BzF0V2kw.cjs');
19
+ require('./shared/unplugin.DS6CFjim.cjs');
20
+ require('./shared/unplugin.BqKLlo1h.cjs');
21
+ require('./shared/unplugin.YcnV3Izb.cjs');
21
22
  require('./css-mangler.cjs');
22
23
  require('postcss');
23
24
  require('postcss-selector-parser');
24
- require('./shared/unplugin.J6ue_lRJ.cjs');
25
+ require('./shared/unplugin.Defu9wGh.cjs');
26
+ require('./shared/unplugin.2qOISpzl.cjs');
25
27
  require('node:zlib');
26
28
  require('postcss-value-parser');
27
29
 
@@ -1,5 +1,4 @@
1
- import { ar } from './shared/unplugin.PKo7wFzu.cjs';
2
- export = ar;
1
+ export { as as default } from './shared/unplugin.BO2_hyS3.cjs';
3
2
  import '@csszyx/compiler';
4
3
  import '@csszyx/types';
5
4
  import 'esbuild';
@@ -1,4 +1,4 @@
1
- export { ar as default } from './shared/unplugin.Bu2rzRtv.mjs';
1
+ export { as as default } from './shared/unplugin.DptK3pl4.mjs';
2
2
  import '@csszyx/compiler';
3
3
  import '@csszyx/types';
4
4
  import 'esbuild';
package/dist/webpack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { a4 as default } from './shared/unplugin.Dx0ngYWw.mjs';
1
+ export { a5 as default } from './shared/unplugin.Cs4H9z9v.mjs';
2
2
  import 'node:crypto';
3
3
  import 'node:fs';
4
4
  import 'node:module';
@@ -12,11 +12,13 @@ import '@csszyx/svelte-adapter';
12
12
  import '@csszyx/types';
13
13
  import '@csszyx/vue-adapter';
14
14
  import 'unplugin';
15
- import './shared/unplugin.DH_ij6cf.mjs';
16
- import './shared/unplugin.C-oQU1jl.mjs';
15
+ import './shared/unplugin.Ba3O1r8M.mjs';
16
+ import './shared/unplugin.wMeicb6E.mjs';
17
+ import './shared/unplugin.2uf-U76p.mjs';
17
18
  import './css-mangler.mjs';
18
19
  import 'postcss';
19
20
  import 'postcss-selector-parser';
20
- import './shared/unplugin.Ceq-N4jI.mjs';
21
+ import './shared/unplugin.DcXM9sq5.mjs';
22
+ import './shared/unplugin.995yC_cN.mjs';
21
23
  import 'node:zlib';
22
24
  import 'postcss-value-parser';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csszyx/unplugin",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Vite and Webpack integration for csszyx",
5
5
  "keywords": [
6
6
  "csszyx",
@@ -104,6 +104,16 @@
104
104
  "default": "./dist/next-watcher.cjs"
105
105
  }
106
106
  },
107
+ "./jest": {
108
+ "import": {
109
+ "types": "./dist/jest-transform.d.mts",
110
+ "default": "./dist/jest-transform.mjs"
111
+ },
112
+ "require": {
113
+ "types": "./dist/jest-transform.d.cts",
114
+ "default": "./dist/jest-transform.cjs"
115
+ }
116
+ },
107
117
  "./postcss": {
108
118
  "import": {
109
119
  "types": "./dist/postcss.d.mts",
@@ -122,11 +132,11 @@
122
132
  "dist"
123
133
  ],
124
134
  "dependencies": {
125
- "@csszyx/compiler": "0.16.0",
126
- "@csszyx/core": "0.16.0",
127
- "@csszyx/svelte-adapter": "0.16.0",
128
- "@csszyx/types": "0.16.0",
129
- "@csszyx/vue-adapter": "0.16.0",
135
+ "@csszyx/compiler": "0.17.0",
136
+ "@csszyx/core": "0.17.0",
137
+ "@csszyx/svelte-adapter": "0.17.0",
138
+ "@csszyx/types": "0.17.0",
139
+ "@csszyx/vue-adapter": "0.17.0",
130
140
  "postcss": "^8.5.26",
131
141
  "postcss-selector-parser": "^7.1.5",
132
142
  "postcss-value-parser": "^4.2.0",
@@ -134,7 +144,7 @@
134
144
  "unplugin": "^3.3.0"
135
145
  },
136
146
  "peerDependencies": {
137
- "@csszyx/runtime": "^0.16.0",
147
+ "@csszyx/runtime": "^0.17.0",
138
148
  "vite": ">=5.0.0"
139
149
  },
140
150
  "peerDependenciesMeta": {
@@ -143,8 +153,8 @@
143
153
  }
144
154
  },
145
155
  "devDependencies": {
146
- "@csszyx/runtime": "0.16.0",
147
- "@csszyx/tooling-metadata": "0.16.0",
156
+ "@csszyx/runtime": "0.17.0",
157
+ "@csszyx/tooling-metadata": "0.17.0",
148
158
  "@tailwindcss/node": "4.3.3",
149
159
  "@types/node": "^22.20.1",
150
160
  "@types/proper-lockfile": "^4.1.4",