unplugin-stylex 0.5.0 → 0.5.1

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.
@@ -0,0 +1,8 @@
1
+ # Changesets
2
+
3
+ Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+ find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
+
7
+ We have a quick list of common questions to get you started engaging with this project in
8
+ [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.0.4/schema.json",
3
+ "changelog": ["@changesets/changelog-github", { "repo": "eryue0220/unplugin-stylex" }],
4
+ "access": "public",
5
+ "commit": false,
6
+ "linked": [],
7
+ "baseBranch": "origin/main",
8
+ "updateInternalDependencies": "patch",
9
+ "ignore": [
10
+ "esbuild-example",
11
+ "farm-example",
12
+ "rollup-example",
13
+ "rsbuild-example",
14
+ "rspack-example",
15
+ "solid-example",
16
+ "vite-example",
17
+ "vue-example",
18
+ "webpack-example"
19
+ ]
20
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # unplugin-stylex
2
+
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#85](https://github.com/eryue0220/unplugin-stylex/pull/85) [`47b44ce`](https://github.com/eryue0220/unplugin-stylex/commit/47b44ce40113613aea856f8731b89ec2f1f15e9a) Thanks [@eryue0220](https://github.com/eryue0220)! - upgrade deps and support changeset
package/biome.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3
+ "files": {
4
+ "ignoreUnknown": false,
5
+ "ignore": [".github/*", "biomejs.json", "dist/*", "node_modules/*", "pnpm-lock.yaml", "pnpm-workspace.yaml"]
6
+ },
7
+ "linter": {
8
+ "enabled": true
9
+ }
10
+ }
@@ -16,6 +16,7 @@ var isDevelopment = process.env.NODE_ENV !== "production" || process.env.BABEL_E
16
16
 
17
17
  // src/core/options.ts
18
18
  function getOptions(options) {
19
+ var _a, _b, _c;
19
20
  const stylex2 = options.stylex || {};
20
21
  const isDev = options.dev || isDevelopment;
21
22
  return {
@@ -31,9 +32,9 @@ function getOptions(options) {
31
32
  useCSSLayers: stylex2.useCSSLayers || false,
32
33
  unstable_moduleResolution: stylex2.unstable_moduleResolution || { type: "commonJS", rootDir: process.cwd() },
33
34
  babelConfig: {
34
- babelrc: (stylex2.babelConfig || {}).babelrc || false,
35
- plugins: (stylex2.babelConfig || {}).plugins || [],
36
- presets: (stylex2.babelConfig || {}).presets || []
35
+ babelrc: _nullishCoalesce(((_a = stylex2.babelConfig) == null ? void 0 : _a.babelrc), () => ( false)),
36
+ plugins: _nullishCoalesce(((_b = stylex2.babelConfig) == null ? void 0 : _b.plugins), () => ( [])),
37
+ presets: _nullishCoalesce(((_c = stylex2.babelConfig) == null ? void 0 : _c.presets), () => ( []))
37
38
  },
38
39
  ...stylex2
39
40
  }
@@ -47,8 +48,8 @@ var _pluginsyntaxjsx = require('@babel/plugin-syntax-jsx'); var _pluginsyntaxjsx
47
48
 
48
49
 
49
50
  // src/core/plugins.ts
50
- var _pluginsyntaxtypescript = require('@babel/plugin-syntax-typescript'); var _pluginsyntaxtypescript2 = _interopRequireDefault(_pluginsyntaxtypescript);
51
51
  var _pluginsyntaxflow = require('@babel/plugin-syntax-flow'); var _pluginsyntaxflow2 = _interopRequireDefault(_pluginsyntaxflow);
52
+ var _pluginsyntaxtypescript = require('@babel/plugin-syntax-typescript'); var _pluginsyntaxtypescript2 = _interopRequireDefault(_pluginsyntaxtypescript);
52
53
  function getSyntaxPlugins(extname2) {
53
54
  const TSPlugin = extname2 === ".tsx" ? [[_pluginsyntaxtypescript2.default, { isTSX: true }]] : [_pluginsyntaxtypescript2.default];
54
55
  return [".js", ".jsx"].includes(extname2) ? [_pluginsyntaxflow2.default] : TSPlugin;
@@ -72,15 +73,12 @@ async function transformer(context) {
72
73
  _pluginsyntaxjsx2.default,
73
74
  _babelplugin2.default.withOptions(stylexBabelPluginOptions)
74
75
  ];
75
- const { code, map, metadata } = await _core.transformAsync.call(void 0,
76
- inputCode,
77
- {
78
- babelrc: (_b = stylex2.babelConfig) == null ? void 0 : _b.babelrc,
79
- filename: id,
80
- presets: (_c = stylex2.babelConfig) == null ? void 0 : _c.presets,
81
- plugins
82
- }
83
- );
76
+ const { code, map, metadata } = await _core.transformAsync.call(void 0, inputCode, {
77
+ babelrc: (_b = stylex2.babelConfig) == null ? void 0 : _b.babelrc,
78
+ filename: id,
79
+ presets: (_c = stylex2.babelConfig) == null ? void 0 : _c.presets,
80
+ plugins
81
+ });
84
82
  if (metadata.stylex && metadata.stylex.length > 0) {
85
83
  stylexRules[id] = metadata.stylex;
86
84
  }
@@ -110,6 +108,7 @@ var unpluginFactory = (rawOptions = {}) => {
110
108
  return validExts instanceof RegExp ? validExts.test(validExtName) : validExts.includes(validExtName);
111
109
  },
112
110
  async transform(code, id) {
111
+ var _a;
113
112
  const dir = path.dirname(id);
114
113
  const basename2 = path.basename(id);
115
114
  const file = path.join(dir, basename2.includes("?") ? basename2.split("?")[0] : basename2);
@@ -124,7 +123,7 @@ var unpluginFactory = (rawOptions = {}) => {
124
123
  };
125
124
  try {
126
125
  const result = await transformer(context);
127
- if (result.stylexRules && result.stylexRules[id]) {
126
+ if ((_a = result.stylexRules) == null ? void 0 : _a[id]) {
128
127
  stylexRules[id] = result.stylexRules[id];
129
128
  }
130
129
  return result;
@@ -156,7 +155,7 @@ var unpluginFactory = (rawOptions = {}) => {
156
155
  },
157
156
  buildEnd() {
158
157
  var _a;
159
- const fileName = `${_nullishCoalesce(((_a = viteConfig.build) == null ? void 0 : _a.assetsDir), () => ( "assets"))}/${options.stylex.filename}`;
158
+ const fileName = `${_nullishCoalesce(((_a = viteConfig == null ? void 0 : viteConfig.build) == null ? void 0 : _a.assetsDir), () => ( "assets"))}/${options.stylex.filename}`;
160
159
  const collectedCSS = buildStylexRules(stylexRules, options.stylex.useCSSLayers);
161
160
  if (!collectedCSS) return;
162
161
  this.emitFile({
@@ -167,15 +166,12 @@ var unpluginFactory = (rawOptions = {}) => {
167
166
  },
168
167
  transformIndexHtml(html, ctx) {
169
168
  var _a, _b;
170
- const fileName = `${_nullishCoalesce(((_a = viteConfig.build) == null ? void 0 : _a.assetsDir), () => ( "assets"))}/${options.stylex.filename}`;
169
+ const fileName = `${_nullishCoalesce(((_a = viteConfig == null ? void 0 : viteConfig.build) == null ? void 0 : _a.assetsDir), () => ( "assets"))}/${options.stylex.filename}`;
171
170
  const css = (_b = ctx.bundle) == null ? void 0 : _b[fileName];
172
171
  if (!css) {
173
172
  return html;
174
173
  }
175
- const publicPath = path.posix.join(
176
- _nullishCoalesce(viteConfig.base, () => ( "/")),
177
- fileName.replace(/\\/g, "/")
178
- );
174
+ const publicPath = path.posix.join(_nullishCoalesce((viteConfig == null ? void 0 : viteConfig.base), () => ( "/")), fileName.replace(/\\/g, "/"));
179
175
  return [
180
176
  {
181
177
  tag: "link",
@@ -191,10 +187,10 @@ var unpluginFactory = (rawOptions = {}) => {
191
187
  };
192
188
  };
193
189
  var unplugin = _unplugin.createUnplugin.call(void 0, unpluginFactory);
194
- var src_default = unplugin;
190
+ var index_default = unplugin;
195
191
 
196
192
 
197
193
 
198
194
 
199
195
 
200
- exports.unpluginFactory = unpluginFactory; exports.unplugin = unplugin; exports.src_default = src_default;
196
+ exports.unpluginFactory = unpluginFactory; exports.unplugin = unplugin; exports.index_default = index_default;
@@ -16,6 +16,7 @@ var isDevelopment = process.env.NODE_ENV !== "production" || process.env.BABEL_E
16
16
 
17
17
  // src/core/options.ts
18
18
  function getOptions(options) {
19
+ var _a, _b, _c;
19
20
  const stylex2 = options.stylex || {};
20
21
  const isDev = options.dev || isDevelopment;
21
22
  return {
@@ -31,9 +32,9 @@ function getOptions(options) {
31
32
  useCSSLayers: stylex2.useCSSLayers || false,
32
33
  unstable_moduleResolution: stylex2.unstable_moduleResolution || { type: "commonJS", rootDir: process.cwd() },
33
34
  babelConfig: {
34
- babelrc: (stylex2.babelConfig || {}).babelrc || false,
35
- plugins: (stylex2.babelConfig || {}).plugins || [],
36
- presets: (stylex2.babelConfig || {}).presets || []
35
+ babelrc: ((_a = stylex2.babelConfig) == null ? void 0 : _a.babelrc) ?? false,
36
+ plugins: ((_b = stylex2.babelConfig) == null ? void 0 : _b.plugins) ?? [],
37
+ presets: ((_c = stylex2.babelConfig) == null ? void 0 : _c.presets) ?? []
37
38
  },
38
39
  ...stylex2
39
40
  }
@@ -47,8 +48,8 @@ import jsxSyntaxPlugin from "@babel/plugin-syntax-jsx";
47
48
  import stylexBabelPlugin from "@stylexjs/babel-plugin";
48
49
 
49
50
  // src/core/plugins.ts
50
- import typescriptSyntaxPlugin from "@babel/plugin-syntax-typescript";
51
51
  import flowSyntaxPlugin from "@babel/plugin-syntax-flow";
52
+ import typescriptSyntaxPlugin from "@babel/plugin-syntax-typescript";
52
53
  function getSyntaxPlugins(extname2) {
53
54
  const TSPlugin = extname2 === ".tsx" ? [[typescriptSyntaxPlugin, { isTSX: true }]] : [typescriptSyntaxPlugin];
54
55
  return [".js", ".jsx"].includes(extname2) ? [flowSyntaxPlugin] : TSPlugin;
@@ -72,15 +73,12 @@ async function transformer(context) {
72
73
  jsxSyntaxPlugin,
73
74
  stylexBabelPlugin.withOptions(stylexBabelPluginOptions)
74
75
  ];
75
- const { code, map, metadata } = await transformAsync(
76
- inputCode,
77
- {
78
- babelrc: (_b = stylex2.babelConfig) == null ? void 0 : _b.babelrc,
79
- filename: id,
80
- presets: (_c = stylex2.babelConfig) == null ? void 0 : _c.presets,
81
- plugins
82
- }
83
- );
76
+ const { code, map, metadata } = await transformAsync(inputCode, {
77
+ babelrc: (_b = stylex2.babelConfig) == null ? void 0 : _b.babelrc,
78
+ filename: id,
79
+ presets: (_c = stylex2.babelConfig) == null ? void 0 : _c.presets,
80
+ plugins
81
+ });
84
82
  if (metadata.stylex && metadata.stylex.length > 0) {
85
83
  stylexRules[id] = metadata.stylex;
86
84
  }
@@ -110,6 +108,7 @@ var unpluginFactory = (rawOptions = {}) => {
110
108
  return validExts instanceof RegExp ? validExts.test(validExtName) : validExts.includes(validExtName);
111
109
  },
112
110
  async transform(code, id) {
111
+ var _a;
113
112
  const dir = path.dirname(id);
114
113
  const basename2 = path.basename(id);
115
114
  const file = path.join(dir, basename2.includes("?") ? basename2.split("?")[0] : basename2);
@@ -124,7 +123,7 @@ var unpluginFactory = (rawOptions = {}) => {
124
123
  };
125
124
  try {
126
125
  const result = await transformer(context);
127
- if (result.stylexRules && result.stylexRules[id]) {
126
+ if ((_a = result.stylexRules) == null ? void 0 : _a[id]) {
128
127
  stylexRules[id] = result.stylexRules[id];
129
128
  }
130
129
  return result;
@@ -156,7 +155,7 @@ var unpluginFactory = (rawOptions = {}) => {
156
155
  },
157
156
  buildEnd() {
158
157
  var _a;
159
- const fileName = `${((_a = viteConfig.build) == null ? void 0 : _a.assetsDir) ?? "assets"}/${options.stylex.filename}`;
158
+ const fileName = `${((_a = viteConfig == null ? void 0 : viteConfig.build) == null ? void 0 : _a.assetsDir) ?? "assets"}/${options.stylex.filename}`;
160
159
  const collectedCSS = buildStylexRules(stylexRules, options.stylex.useCSSLayers);
161
160
  if (!collectedCSS) return;
162
161
  this.emitFile({
@@ -167,15 +166,12 @@ var unpluginFactory = (rawOptions = {}) => {
167
166
  },
168
167
  transformIndexHtml(html, ctx) {
169
168
  var _a, _b;
170
- const fileName = `${((_a = viteConfig.build) == null ? void 0 : _a.assetsDir) ?? "assets"}/${options.stylex.filename}`;
169
+ const fileName = `${((_a = viteConfig == null ? void 0 : viteConfig.build) == null ? void 0 : _a.assetsDir) ?? "assets"}/${options.stylex.filename}`;
171
170
  const css = (_b = ctx.bundle) == null ? void 0 : _b[fileName];
172
171
  if (!css) {
173
172
  return html;
174
173
  }
175
- const publicPath = path.posix.join(
176
- viteConfig.base ?? "/",
177
- fileName.replace(/\\/g, "/")
178
- );
174
+ const publicPath = path.posix.join((viteConfig == null ? void 0 : viteConfig.base) ?? "/", fileName.replace(/\\/g, "/"));
179
175
  return [
180
176
  {
181
177
  tag: "link",
@@ -191,10 +187,10 @@ var unpluginFactory = (rawOptions = {}) => {
191
187
  };
192
188
  };
193
189
  var unplugin = createUnplugin(unpluginFactory);
194
- var src_default = unplugin;
190
+ var index_default = unplugin;
195
191
 
196
192
  export {
197
193
  unpluginFactory,
198
194
  unplugin,
199
- src_default
195
+ index_default
200
196
  };
package/dist/esbuild.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkM2CH7D27cjs = require('./chunk-M2CH7D27.cjs');
3
+ var _chunk3YYDUMQWcjs = require('./chunk-3YYDUMQW.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/esbuild.ts
7
7
  var _unplugin = require('unplugin');
8
- var esbuildPlugin = _unplugin.createEsbuildPlugin.call(void 0, _chunkM2CH7D27cjs.unpluginFactory);
8
+ var esbuildPlugin = _unplugin.createEsbuildPlugin.call(void 0, _chunk3YYDUMQWcjs.unpluginFactory);
9
9
  var esbuild_default = esbuildPlugin;
10
10
 
11
11
 
package/dist/esbuild.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-KUBFLNSW.js";
3
+ } from "./chunk-MOKLFQZU.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/esbuild.ts
package/dist/farm.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkM2CH7D27cjs = require('./chunk-M2CH7D27.cjs');
3
+ var _chunk3YYDUMQWcjs = require('./chunk-3YYDUMQW.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/farm.ts
7
7
  var _unplugin = require('unplugin');
8
- var farmPlugin = _unplugin.createFarmPlugin.call(void 0, _chunkM2CH7D27cjs.unpluginFactory);
8
+ var farmPlugin = _unplugin.createFarmPlugin.call(void 0, _chunk3YYDUMQWcjs.unpluginFactory);
9
9
  var farm_default = farmPlugin;
10
10
 
11
11
 
package/dist/farm.d.cts CHANGED
@@ -1,5 +1,4 @@
1
- import { JsPluginExtended } from 'unplugin';
2
- import { UnpluginStylexInstance } from './types.cjs';
1
+ import { createFarmPlugin } from 'unplugin';
3
2
 
4
3
  /**
5
4
  * This entry file is for farm plugin.
@@ -7,6 +6,6 @@ import { UnpluginStylexInstance } from './types.cjs';
7
6
  * @module
8
7
  */
9
8
 
10
- declare const farmPlugin: UnpluginStylexInstance<JsPluginExtended | JsPluginExtended[]>;
9
+ declare const farmPlugin: ReturnType<typeof createFarmPlugin>;
11
10
 
12
11
  export { farmPlugin as default };
package/dist/farm.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { JsPluginExtended } from 'unplugin';
2
- import { UnpluginStylexInstance } from './types.js';
1
+ import { createFarmPlugin } from 'unplugin';
3
2
 
4
3
  /**
5
4
  * This entry file is for farm plugin.
@@ -7,6 +6,6 @@ import { UnpluginStylexInstance } from './types.js';
7
6
  * @module
8
7
  */
9
8
 
10
- declare const farmPlugin: UnpluginStylexInstance<JsPluginExtended | JsPluginExtended[]>;
9
+ declare const farmPlugin: ReturnType<typeof createFarmPlugin>;
11
10
 
12
11
  export { farmPlugin as default };
package/dist/farm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-KUBFLNSW.js";
3
+ } from "./chunk-MOKLFQZU.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/farm.ts
package/dist/index.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkM2CH7D27cjs = require('./chunk-M2CH7D27.cjs');
5
+ var _chunk3YYDUMQWcjs = require('./chunk-3YYDUMQW.cjs');
6
6
  require('./chunk-ZBPRDZS4.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.default = _chunkM2CH7D27cjs.src_default; exports.unplugin = _chunkM2CH7D27cjs.unplugin; exports.unpluginFactory = _chunkM2CH7D27cjs.unpluginFactory;
11
+ exports.default = _chunk3YYDUMQWcjs.index_default; exports.unplugin = _chunk3YYDUMQWcjs.unplugin; exports.unpluginFactory = _chunk3YYDUMQWcjs.unpluginFactory;
package/dist/index.d.cts CHANGED
@@ -5,6 +5,7 @@ export { BabelConfig, StylexOptions, UnpluginStylexInstance } from './types.cjs'
5
5
  /**
6
6
  * This entry file is for main unplugin.
7
7
  *
8
+ *
8
9
  * @module
9
10
  */
10
11
 
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { BabelConfig, StylexOptions, UnpluginStylexInstance } from './types.js';
5
5
  /**
6
6
  * This entry file is for main unplugin.
7
7
  *
8
+ *
8
9
  * @module
9
10
  */
10
11
 
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
- src_default,
2
+ index_default,
3
3
  unplugin,
4
4
  unpluginFactory
5
- } from "./chunk-KUBFLNSW.js";
5
+ } from "./chunk-MOKLFQZU.js";
6
6
  import "./chunk-6F4PWJZI.js";
7
7
  export {
8
- src_default as default,
8
+ index_default as default,
9
9
  unplugin,
10
10
  unpluginFactory
11
11
  };
package/dist/rollup.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkM2CH7D27cjs = require('./chunk-M2CH7D27.cjs');
3
+ var _chunk3YYDUMQWcjs = require('./chunk-3YYDUMQW.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/rollup.ts
7
7
  var _unplugin = require('unplugin');
8
- var rollupPlugin = _unplugin.createRollupPlugin.call(void 0, _chunkM2CH7D27cjs.unpluginFactory);
8
+ var rollupPlugin = _unplugin.createRollupPlugin.call(void 0, _chunk3YYDUMQWcjs.unpluginFactory);
9
9
  var rollup_default = rollupPlugin;
10
10
 
11
11
 
package/dist/rollup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-KUBFLNSW.js";
3
+ } from "./chunk-MOKLFQZU.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/rollup.ts
package/dist/rspack.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkM2CH7D27cjs = require('./chunk-M2CH7D27.cjs');
3
+ var _chunk3YYDUMQWcjs = require('./chunk-3YYDUMQW.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/rspack.ts
7
7
  var _unplugin = require('unplugin');
8
- var rspackPlugin = _unplugin.createRspackPlugin.call(void 0, _chunkM2CH7D27cjs.unpluginFactory);
8
+ var rspackPlugin = _unplugin.createRspackPlugin.call(void 0, _chunk3YYDUMQWcjs.unpluginFactory);
9
9
  var rspack_default = rspackPlugin;
10
10
 
11
11
 
package/dist/rspack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-KUBFLNSW.js";
3
+ } from "./chunk-MOKLFQZU.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/rspack.ts
package/dist/vite.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkM2CH7D27cjs = require('./chunk-M2CH7D27.cjs');
3
+ var _chunk3YYDUMQWcjs = require('./chunk-3YYDUMQW.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/vite.ts
7
7
  var _unplugin = require('unplugin');
8
- var vitePlugin = _unplugin.createVitePlugin.call(void 0, _chunkM2CH7D27cjs.unpluginFactory);
8
+ var vitePlugin = _unplugin.createVitePlugin.call(void 0, _chunk3YYDUMQWcjs.unpluginFactory);
9
9
  var vite_default = vitePlugin;
10
10
 
11
11
 
package/dist/vite.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-KUBFLNSW.js";
3
+ } from "./chunk-MOKLFQZU.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/vite.ts
package/dist/webpack.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkM2CH7D27cjs = require('./chunk-M2CH7D27.cjs');
3
+ var _chunk3YYDUMQWcjs = require('./chunk-3YYDUMQW.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/webpack.ts
7
7
  var _unplugin = require('unplugin');
8
- var webpackPlugin = _unplugin.createWebpackPlugin.call(void 0, _chunkM2CH7D27cjs.unpluginFactory);
8
+ var webpackPlugin = _unplugin.createWebpackPlugin.call(void 0, _chunk3YYDUMQWcjs.unpluginFactory);
9
9
  var webpack_default = webpackPlugin;
10
10
 
11
11
 
package/dist/webpack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-KUBFLNSW.js";
3
+ } from "./chunk-MOKLFQZU.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/webpack.ts
package/jsr.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eryue0220/unplugin-stylex",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "exports": {
5
5
  "./index": "./src/index.ts",
6
6
  "./esbuild": "./src/esbuild.ts",
@@ -10,12 +10,5 @@
10
10
  "./vite": "./src/vite.ts",
11
11
  "./webpack": "./src/webpack.ts"
12
12
  },
13
- "exclude": [
14
- ".eslintrc.json",
15
- ".eslintignore",
16
- "test",
17
- "examples",
18
- "pnpm-lock.yaml",
19
- "pnpm-workspace.yaml"
20
- ]
21
- }
13
+ "exclude": [".eslintrc.json", ".eslintignore", "test", "examples", "pnpm-lock.yaml", "pnpm-workspace.yaml"]
14
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unplugin-stylex",
3
- "version": "0.5.0",
4
- "packageManager": "pnpm@8.11.0",
3
+ "version": "0.5.1",
4
+ "packageManager": "pnpm@9.12.2",
5
5
  "description": "Unplugin for stylex",
6
6
  "repository": "https://github.com/eryue0220/unplugin-stylex",
7
7
  "keywords": [
@@ -10,8 +10,10 @@
10
10
  "stylex-plugin",
11
11
  "farm",
12
12
  "esbuild",
13
+ "rolldown",
13
14
  "rollup",
14
15
  "rspack",
16
+ "svelte",
15
17
  "vite"
16
18
  ],
17
19
  "author": "eryue0220<eryue0220@gmail.com>",
@@ -69,36 +71,40 @@
69
71
  "test": "vitest",
70
72
  "test:update": "vitest -u",
71
73
  "test:cov": "vitest --coverage",
72
- "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
73
- "check": "pnpm run lint && pnpm run typecheck",
74
- "typecheck": "tsc -p tsconfig.json --noEmit"
74
+ "lint": "pnpm biome lint .",
75
+ "check": "pnpm biome check . --line-width=120 --quote-style=single --indent-style=space --indent-width=2 --semicolons=as-needed",
76
+ "ci": "pnpm run lint && pnpm run check",
77
+ "jsr": "pnpm dlx jsr publish",
78
+ "changeset": "pnpm dlx @changesets/cli add",
79
+ "changeset:version": "pnpm dlx @changesets/cli version && pnpm install",
80
+ "changeset:release": "pnpm run build && pnpm dlx @changesets/cli publish"
75
81
  },
76
82
  "engines": {
77
- "node": ">=16.14.0"
83
+ "node": ">=18"
78
84
  },
79
85
  "peerDependencies": {
80
86
  "@stylexjs/stylex": "0.x"
81
87
  },
82
88
  "dependencies": {
83
- "@babel/core": "^7.25.2",
84
- "@babel/plugin-syntax-flow": "^7.24.7",
85
- "@babel/plugin-syntax-jsx": "^7.24.7",
86
- "@babel/plugin-syntax-typescript": "^7.24.7",
87
- "@rollup/pluginutils": "^5.1.0",
88
- "@stylexjs/babel-plugin": "^0.5.1",
89
- "unplugin": "^1.12.1"
89
+ "@babel/core": "^7.26.0",
90
+ "@babel/plugin-syntax-flow": "^7.26.0",
91
+ "@babel/plugin-syntax-jsx": "^7.25.9",
92
+ "@babel/plugin-syntax-typescript": "^7.25.9",
93
+ "@rollup/pluginutils": "^5.1.3",
94
+ "@stylexjs/babel-plugin": "^0.9.3",
95
+ "unplugin": "^1.15.0"
90
96
  },
91
97
  "devDependencies": {
92
- "@stylistic/eslint-plugin-ts": "^1.8.1",
93
- "@types/node": "^20.14.14",
94
- "@typescript-eslint/eslint-plugin": "^6.21.0",
95
- "@typescript-eslint/parser": "^6.21.0",
98
+ "@biomejs/biome": "1.9.4",
99
+ "@changesets/changelog-github": "^0.5.0",
100
+ "@changesets/cli": "^2.27.10",
101
+ "@types/node": "^20.17.2",
96
102
  "@vitest/coverage-v8": "^1.6.0",
97
103
  "babel-plugin-syntax-hermes-parser": "^0.19.2",
98
- "eslint": "^8.57.0",
99
- "tsup": "^8.2.4",
100
- "typescript": "^5.5.4",
101
- "vite": "^5.4.0",
104
+ "jsr": "^0.13.2",
105
+ "tsup": "^8.3.5",
106
+ "typescript": "^5.6.3",
107
+ "vite": "^5.4.10",
102
108
  "vitest": "^1.6.0"
103
109
  }
104
110
  }
@@ -1,2 +1,3 @@
1
1
  packages:
2
+ - '.'
2
3
  - examples/*
package/tsconfig.json CHANGED
@@ -14,10 +14,6 @@
14
14
  "@/*": ["./src/*"]
15
15
  }
16
16
  },
17
- "include": [
18
- "src"
19
- ],
20
- "exclude": [
21
- "node_modules"
22
- ]
17
+ "include": ["src"],
18
+ "exclude": ["node_modules"]
23
19
  }