@oxc-angular-testing/transform 0.0.12 → 0.0.14

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 (2) hide show
  1. package/index.d.ts +22 -3
  2. package/package.json +8 -8
package/index.d.ts CHANGED
@@ -27,10 +27,12 @@ export interface TransformOptions {
27
27
  */
28
28
  jitTransforms?: boolean
29
29
  /**
30
- * Hoist `jest.mock()` / `jest.unmock()` / etc. above imports
31
- * (babel-plugin-jest-hoist). Default `false`; the jest plugin enables it.
30
+ * Hoist mock-registration calls (`mock()` / `unmock()` / …) above imports
31
+ * (babel-plugin-jest-hoist). `"jest"` hoists `jest.*` (global or
32
+ * `@jest/globals`); `"vi"` hoists `vi.*` (global or `vitest`). Omitted /
33
+ * unknown (default) hoists nothing. The jest plugin sets `"jest"`.
32
34
  */
33
- hoistJestMock?: boolean
35
+ hoistMock?: string
34
36
  /**
35
37
  * JSX runtime for `.tsx`/`.jsx` (mixed Angular + React): `"automatic"`
36
38
  * (default) or `"classic"`. Derive from tsconfig `jsx`.
@@ -52,6 +54,23 @@ export interface TransformOptions {
52
54
  * Derive from tsconfig `target`. Default `"esnext"`.
53
55
  */
54
56
  target?: string
57
+ /**
58
+ * Keep component styles instead of stripping them (default `false`).
59
+ * `styleUrl`/`styleUrls` become default imports (`"esm"`) or `require(...)`
60
+ * calls (`"commonjs"`), merged after any inline `styles` — the bundler's
61
+ * CSS pipeline (e.g. vite + sass) compiles them. No CSS is compiled by the
62
+ * transform itself. See `keepStylesQuery` for the query parameter that
63
+ * makes the bundler return the CSS as a string.
64
+ */
65
+ keepStyles?: boolean
66
+ /**
67
+ * Query parameter appended to each style URL rewritten under `keepStyles`:
68
+ * e.g. `"inline"` turns `./a.scss` into `./a.scss?inline` (`&inline` when
69
+ * the URL already has a query), which makes vite return the compiled CSS
70
+ * as a string. Default: unset — URLs are emitted verbatim. The vitest
71
+ * plugin passes `"inline"`.
72
+ */
73
+ keepStylesQuery?: string
55
74
  /**
56
75
  * Master switch for TS→JS + decorator lowering (default `true`; set `false`
57
76
  * only to inspect the pre-lowering TypeScript AST).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-angular-testing/transform",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Fast Angular test transforms (resource inlining, decorator downleveling, signal initializer APIs) on oxc, with optional istanbul coverage instrumentation in a single AST pass.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -55,13 +55,13 @@
55
55
  "typescript": "^5.6.0"
56
56
  },
57
57
  "optionalDependencies": {
58
- "@oxc-angular-testing/binding-darwin-arm64": "0.0.12",
59
- "@oxc-angular-testing/binding-darwin-x64": "0.0.12",
60
- "@oxc-angular-testing/binding-linux-x64-gnu": "0.0.12",
61
- "@oxc-angular-testing/binding-linux-arm64-gnu": "0.0.12",
62
- "@oxc-angular-testing/binding-linux-x64-musl": "0.0.12",
63
- "@oxc-angular-testing/binding-win32-x64-msvc": "0.0.12",
64
- "@oxc-angular-testing/binding-win32-arm64-msvc": "0.0.12"
58
+ "@oxc-angular-testing/binding-darwin-arm64": "0.0.14",
59
+ "@oxc-angular-testing/binding-darwin-x64": "0.0.14",
60
+ "@oxc-angular-testing/binding-linux-x64-gnu": "0.0.14",
61
+ "@oxc-angular-testing/binding-linux-arm64-gnu": "0.0.14",
62
+ "@oxc-angular-testing/binding-linux-x64-musl": "0.0.14",
63
+ "@oxc-angular-testing/binding-win32-x64-msvc": "0.0.14",
64
+ "@oxc-angular-testing/binding-win32-arm64-msvc": "0.0.14"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "napi build --platform --release && tsc -p tsconfig.json",