@stylexswc/postcss-plugin 0.6.2 → 0.6.3-rc.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/dist/builder.js CHANGED
@@ -85,7 +85,7 @@ function createBuilder() {
85
85
  cwd,
86
86
  });
87
87
  // Normalize file paths
88
- files = files.map(file => (file.includes(cwd || '/') ? file : node_path_1.default.join(cwd || '/', file)));
88
+ files = files.map(file => (file.includes(cwd || '/') ? file : node_path_1.default.resolve(cwd || '/', file)));
89
89
  return files;
90
90
  }
91
91
  // Transforms the included files, bundles the CSS, and returns the result.
package/dist/bundler.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { StyleXOptions } from '@stylexswc/rs-compiler';
1
+ import type { StyleXOptions } from '@stylexswc/rs-compiler';
2
2
  import type { TransformOptions, StyleXPluginOption } from './types';
3
3
  export default function createBundler(): {
4
4
  shouldTransform: (sourceCode: string) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../src/bundler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAgC,MAAM,wBAAwB,CAAC;AAErF,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGpE,MAAM,CAAC,OAAO,UAAU,aAAa;kCAIE,MAAM;oBAMrC,MAAM,cACE,MAAM,aACP,aAAa,WACf,gBAAgB;iBAmCP,MAAM;+BAKQ,IAAI,CAAC,kBAAkB,EAAE,cAAc,CAAC;EAc3E"}
1
+ {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../src/bundler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGpE,MAAM,CAAC,OAAO,UAAU,aAAa;kCAIE,MAAM;oBAMrC,MAAM,cACE,MAAM,aACP,aAAa,WACf,gBAAgB;iBAmCP,MAAM;+BAKQ,IAAI,CAAC,kBAAkB,EAAE,cAAc,CAAC;EAc3E"}
package/dist/bundler.js CHANGED
@@ -22,7 +22,7 @@ function createBundler() {
22
22
  metadata: { stylex: [] },
23
23
  };
24
24
  try {
25
- transformResult = (0, rs_compiler_1.transform)(id, sourceCode, rsOptions);
25
+ transformResult = (0, rs_compiler_1.transform)(id, sourceCode, (0, rs_compiler_1.normalizeRsOptions)(rsOptions ?? {}));
26
26
  }
27
27
  catch (error) {
28
28
  if (shouldSkipTransformError) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAQlD,QAAA,MAAM,MAAM;0DAQT,kBAAkB;;yBAiBC,OAAO,CAAC,IAAI,UAAU,OAAO,CAAC,MAAM;;;CA6DzD,CAAC;AAKF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAQlD,QAAA,MAAM,MAAM;0DAQT,kBAAkB;;yBAiBC,OAAO,CAAC,IAAI,UAAU,OAAO,CAAC,MAAM;;;CAsDzD,CAAC;AAKF,eAAe,MAAM,CAAC"}
package/dist/index.js CHANGED
@@ -33,14 +33,7 @@ rsOptions = {}, include, exclude, useCSSLayers = false, }) => {
33
33
  include,
34
34
  exclude,
35
35
  cwd,
36
- rsOptions: {
37
- useRemForFontSize: true,
38
- runtimeInjection: false,
39
- genConditionalClasses: true,
40
- treeshakeCompensation: true,
41
- importSources: ['stylex', '@stylexjs/stylex'],
42
- ...rsOptions,
43
- },
36
+ rsOptions,
44
37
  useCSSLayers,
45
38
  isDev,
46
39
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stylexswc/postcss-plugin",
3
3
  "description": "StyleX PostCSS plugin with NAPI-RS compiler",
4
- "version": "0.6.2",
4
+ "version": "0.6.3-rc.2",
5
5
  "config": {
6
6
  "scripty": {
7
7
  "path": "../../scripts/packages"
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@stylexjs/babel-plugin": "^0.10.1",
12
+ "@stylexswc/rs-compiler": "0.6.3-rc.2",
12
13
  "fast-glob": "^3.3.2",
13
14
  "glob-parent": "^6.0.2",
14
15
  "is-glob": "^4.0.3",
@@ -16,9 +17,8 @@
16
17
  },
17
18
  "devDependencies": {
18
19
  "@babel/types": "^7.23.9",
19
- "@stylexswc/eslint-config": "0.6.2",
20
- "@stylexswc/rs-compiler": "0.6.2",
21
- "@stylexswc/typescript-config": "0.6.2",
20
+ "@stylexswc/eslint-config": "0.6.3-rc.2",
21
+ "@stylexswc/typescript-config": "0.6.3-rc.2",
22
22
  "@types/babel__core": "^7.20.5",
23
23
  "@types/glob-parent": "^5.1.3",
24
24
  "@types/is-glob": "^4.0.4",
@@ -49,6 +49,7 @@
49
49
  "clean": "del-cli dist",
50
50
  "lint": "eslint . --color",
51
51
  "lint:check": "eslint . --color --format json --output-file dist/eslint_report.json",
52
+ "postbuild": "pnpm run check:artifacts",
52
53
  "precommit": "lint-staged",
53
54
  "prepush": "lint-prepush",
54
55
  "test": "echo \"Error: no test specified\" && exit 0",