unplugin-stylex 0.5.1 → 0.5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # unplugin-stylex
2
2
 
3
+ ## 0.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#99](https://github.com/eryue0220/unplugin-stylex/pull/99) [`e44301a`](https://github.com/eryue0220/unplugin-stylex/commit/e44301a934c65e46dc00de650c910babb31e2525) Thanks [@eryue0220](https://github.com/eryue0220)! - fix unplugin option alias prop
8
+
9
+ ## 0.5.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#93](https://github.com/eryue0220/unplugin-stylex/pull/93) [`d5f2c1a`](https://github.com/eryue0220/unplugin-stylex/commit/d5f2c1a287ac7325fb6c0ce07355f10600dc01a2) Thanks [@eryue0220](https://github.com/eryue0220)! - fix: update stylex aliases types
14
+
15
+ - [#97](https://github.com/eryue0220/unplugin-stylex/pull/97) [`906a065`](https://github.com/eryue0220/unplugin-stylex/commit/906a065c7f9cb84821bf3dc8567e1410fcdb59df) Thanks [@eryue0220](https://github.com/eryue0220)! - fix aliases type declaration
16
+
3
17
  ## 0.5.1
4
18
 
5
19
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 cin
3
+ Copyright (c) 2023 eryue0220
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -26,7 +26,7 @@ pnpm i unplugin-stylex --save-dev
26
26
  ## Configuration
27
27
 
28
28
  <details>
29
- <summary>Vite</summary><br>
29
+ <summary>vite</summary><br>
30
30
 
31
31
  ```js
32
32
  // vite.config.js
@@ -94,6 +94,23 @@ module.exports = {
94
94
 
95
95
  </br></details>
96
96
 
97
+ <details>
98
+ <summary>rolldown(⚠️ experimental)</summary><br>
99
+
100
+ ```js
101
+ // rolldown.config.js
102
+ import stylexRolldownPlugin from 'unplugin-stylex/rolldown'
103
+
104
+ export default {
105
+ // other rolldown config
106
+ plugins: [
107
+ stylexRolldownPlugin({ /* options */}),
108
+ ],
109
+ }
110
+ ```
111
+
112
+ </br></details>
113
+
97
114
  <details>
98
115
  <summary>rollup</summary><br>
99
116
 
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk3YYDUMQWcjs = require('./chunk-3YYDUMQW.cjs');
4
+ require('./chunk-ZBPRDZS4.cjs');
5
+
6
+ // src/rolldown.ts
7
+ var _unplugin = require('unplugin');
8
+ var rolldownPlugin = _unplugin.createRolldownPlugin.call(void 0, _chunk3YYDUMQWcjs.unpluginFactory);
9
+ var rolldown_default = rolldownPlugin;
10
+
11
+
12
+ exports.default = rolldown_default;
@@ -0,0 +1,12 @@
1
+ import { RolldownPlugin } from 'unplugin';
2
+ import { UnpluginStylexInstance } from './types.cjs';
3
+
4
+ /**
5
+ * This entry file is for rolldown plugin.
6
+ *
7
+ * @module
8
+ */
9
+
10
+ declare const rolldownPlugin: UnpluginStylexInstance<RolldownPlugin | RolldownPlugin[]>;
11
+
12
+ export { rolldownPlugin as default };
@@ -0,0 +1,12 @@
1
+ import { RolldownPlugin } from 'unplugin';
2
+ import { UnpluginStylexInstance } from './types.js';
3
+
4
+ /**
5
+ * This entry file is for rolldown plugin.
6
+ *
7
+ * @module
8
+ */
9
+
10
+ declare const rolldownPlugin: UnpluginStylexInstance<RolldownPlugin | RolldownPlugin[]>;
11
+
12
+ export { rolldownPlugin as default };
@@ -0,0 +1,12 @@
1
+ import {
2
+ unpluginFactory
3
+ } from "./chunk-MOKLFQZU.js";
4
+ import "./chunk-6F4PWJZI.js";
5
+
6
+ // src/rolldown.ts
7
+ import { createRolldownPlugin } from "unplugin";
8
+ var rolldownPlugin = createRolldownPlugin(unpluginFactory);
9
+ var rolldown_default = rolldownPlugin;
10
+ export {
11
+ rolldown_default as default
12
+ };
package/dist/types.d.cts CHANGED
@@ -5,7 +5,7 @@ type BabelConfig = {
5
5
  };
6
6
  type StylexOptions = {
7
7
  filename?: string;
8
- aliases?: string[];
8
+ aliases?: Record<string, string | string[]>;
9
9
  stylexImports?: string[];
10
10
  classNamePrefix?: string;
11
11
  unstable_moduleResolution?: {
package/dist/types.d.ts CHANGED
@@ -5,7 +5,7 @@ type BabelConfig = {
5
5
  };
6
6
  type StylexOptions = {
7
7
  filename?: string;
8
- aliases?: string[];
8
+ aliases?: Record<string, string | string[]>;
9
9
  stylexImports?: string[];
10
10
  classNamePrefix?: string;
11
11
  unstable_moduleResolution?: {
package/jsr.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@eryue0220/unplugin-stylex",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "exports": {
5
5
  "./index": "./src/index.ts",
6
6
  "./esbuild": "./src/esbuild.ts",
7
7
  "./farm": "./src/farm.ts",
8
+ "./rolldown": "./src/rolldown.ts",
8
9
  "./rollup": "./src/rollup.ts",
9
10
  "./rspack": "./src/rspack.ts",
10
11
  "./vite": "./src/vite.ts",
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "unplugin-stylex",
3
- "version": "0.5.1",
4
- "packageManager": "pnpm@9.12.2",
3
+ "version": "0.5.2",
5
4
  "description": "Unplugin for stylex",
6
5
  "repository": "https://github.com/eryue0220/unplugin-stylex",
7
6
  "keywords": [
@@ -38,6 +37,11 @@
38
37
  "require": "./dist/farm.cjs",
39
38
  "import": "./dist/farm.js"
40
39
  },
40
+ "./rolldown": {
41
+ "types": "./dist/rolldown.d.ts",
42
+ "require": "./dist/rolldown.cjs",
43
+ "import": "./dist/rolldown.js"
44
+ },
41
45
  "./rollup": {
42
46
  "types": "./dist/rollup.d.ts",
43
47
  "require": "./dist/rollup.cjs",
@@ -65,20 +69,6 @@
65
69
  },
66
70
  "./*": "./*"
67
71
  },
68
- "scripts": {
69
- "dev": "tsup src/*ts --watch src",
70
- "build": "tsup src/*.ts --format cjs,esm --dts --splitting --clean",
71
- "test": "vitest",
72
- "test:update": "vitest -u",
73
- "test:cov": "vitest --coverage",
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"
81
- },
82
72
  "engines": {
83
73
  "node": ">=18"
84
74
  },
@@ -106,5 +96,19 @@
106
96
  "typescript": "^5.6.3",
107
97
  "vite": "^5.4.10",
108
98
  "vitest": "^1.6.0"
99
+ },
100
+ "scripts": {
101
+ "dev": "tsup src/*ts --watch src",
102
+ "build": "tsup src/*.ts --format cjs,esm --dts --splitting --clean",
103
+ "test": "vitest",
104
+ "test:update": "vitest -u",
105
+ "test:cov": "vitest --coverage",
106
+ "lint": "pnpm biome lint",
107
+ "check": "pnpm biome check . --line-width=120 --quote-style=single --indent-style=space --indent-width=2 --semicolons=as-needed",
108
+ "ci": "pnpm run lint && pnpm run check && pnpm run build",
109
+ "jsr": "pnpm dlx jsr publish",
110
+ "changeset": "pnpm dlx @changesets/cli add",
111
+ "changeset:version": "pnpm dlx @changesets/cli version && pnpm install",
112
+ "changeset:release": "pnpm run build && pnpm dlx @changesets/cli publish"
109
113
  }
110
- }
114
+ }