@jscutlery/swc-angular 0.14.15 → 0.16.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ ## 0.16.0 (2024-10-14)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - **swc-plugin-angular:** ✨ optional transform styleUrl and styleUrls ([#421](https://github.com/jscutlery/devkit/pull/421))
7
+
8
+
9
+ ### ❤️ Thank You
10
+
11
+ - 56789a1987 @56789a1987
12
+
13
+ ## 0.15.0 (2024-10-14)
14
+
15
+
16
+ ### 🚀 Features
17
+
18
+ - **swc-angular:** ✨ upgrade @swc/core to 1.6.13 ([#607](https://github.com/jscutlery/devkit/pull/607))
19
+
20
+
21
+ ### 🩹 Fixes
22
+
23
+ - 📦 update dependency @babel/core to v7.25.8 ([#609](https://github.com/jscutlery/devkit/pull/609))
24
+
25
+
26
+ ### ❤️ Thank You
27
+
28
+ - Dmitry Zakharov @pumano
29
+
1
30
  ## 0.14.15 (2024-10-09)
2
31
 
3
32
 
package/index.cjs.js CHANGED
@@ -43,6 +43,8 @@ function swcAngularPreset(options = {}) {
43
43
  [
44
44
  '@jscutlery/swc-angular-plugin',
45
45
  {
46
+ importStyles: options.importStyles,
47
+ styleInlineSuffix: options.styleInlineSuffix,
46
48
  templateRawSuffix: options.templateRawSuffix
47
49
  }
48
50
  ]
@@ -65,6 +67,8 @@ function swcAngularJestTransformer() {
65
67
  }
66
68
  function swcAngularVitePreset() {
67
69
  return swcAngularPreset({
70
+ importStyles: true,
71
+ styleInlineSuffix: true,
68
72
  templateRawSuffix: true
69
73
  });
70
74
  }
@@ -89,10 +93,10 @@ function assertCompatibleSwcCoreVersion(version) {
89
93
  const packageJsonPath = node_path.join(node_path.dirname(require.resolve('@swc/core')), 'package.json');
90
94
  version = fileSystem.readJsonFile(packageJsonPath).version;
91
95
  }
92
- if (!(version.startsWith('1.4.') || version.startsWith('1.5.'))) {
96
+ if (!(version.startsWith('1.4.') || version.startsWith('1.5.') || version.startsWith('1.6.'))) {
93
97
  console.error(`
94
98
  @swc/core version ${version} is incompatible with @jscutlery/swc-angular.
95
- Please use @swc/core version 1.4.x or 1.5.x.
99
+ Please use @swc/core version 1.4.x or 1.5.x. or 1.6.x
96
100
  > npm add -D @swc/core@~1.5.0
97
101
  `);
98
102
  process.exit(1);
package/index.esm.js CHANGED
@@ -39,6 +39,8 @@ function swcAngularPreset(options = {}) {
39
39
  [
40
40
  '@jscutlery/swc-angular-plugin',
41
41
  {
42
+ importStyles: options.importStyles,
43
+ styleInlineSuffix: options.styleInlineSuffix,
42
44
  templateRawSuffix: options.templateRawSuffix
43
45
  }
44
46
  ]
@@ -61,6 +63,8 @@ function swcAngularJestTransformer() {
61
63
  }
62
64
  function swcAngularVitePreset() {
63
65
  return swcAngularPreset({
66
+ importStyles: true,
67
+ styleInlineSuffix: true,
64
68
  templateRawSuffix: true
65
69
  });
66
70
  }
@@ -85,10 +89,10 @@ function assertCompatibleSwcCoreVersion(version) {
85
89
  const packageJsonPath = join(dirname(require.resolve('@swc/core')), 'package.json');
86
90
  version = fileSystem.readJsonFile(packageJsonPath).version;
87
91
  }
88
- if (!(version.startsWith('1.4.') || version.startsWith('1.5.'))) {
92
+ if (!(version.startsWith('1.4.') || version.startsWith('1.5.') || version.startsWith('1.6.'))) {
89
93
  console.error(`
90
94
  @swc/core version ${version} is incompatible with @jscutlery/swc-angular.
91
- Please use @swc/core version 1.4.x or 1.5.x.
95
+ Please use @swc/core version 1.4.x or 1.5.x. or 1.6.x
92
96
  > npm add -D @swc/core@~1.5.0
93
97
  `);
94
98
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jscutlery/swc-angular",
3
- "version": "0.14.15",
3
+ "version": "0.16.0",
4
4
  "repository": {
5
5
  "url": "https://github.com/jscutlery/devkit"
6
6
  },
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "peerDependencies": {
14
14
  "@jscutlery/swc-angular-plugin": ">=0.11.0 <1.0.0",
15
- "@swc/core": ">=1.4.0 <1.6.0"
15
+ "@swc/core": ">=1.4.0 <1.7.0"
16
16
  },
17
17
  "module": "./index.esm.js",
18
18
  "main": "./index.cjs.js"
package/src/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import type { Options } from '@swc/core';
2
2
  export interface AngularPresetOptions {
3
+ importStyles?: boolean;
4
+ styleInlineSuffix?: boolean;
3
5
  templateRawSuffix?: boolean;
4
6
  }
5
7
  export declare function swcAngularPreset(options?: AngularPresetOptions): {
@@ -47,6 +49,7 @@ export declare function swcAngularUnpluginOptions(): Options & {
47
49
  tsconfigFile?: boolean;
48
50
  };
49
51
  interface SwcPluginAngularOptions {
52
+ styleInlineSuffix?: boolean;
50
53
  templateRawSuffix?: boolean;
51
54
  }
52
55
  /**