@servicetitan/startup 36.1.2-canary.6 → 36.1.2-canary.7

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 (55) hide show
  1. package/dist/webpack/configs/loaders/css-loader.d.ts +1 -1
  2. package/dist/webpack/configs/loaders/css-loader.js +1 -1
  3. package/dist/webpack/configs/loaders/css-loader.js.map +1 -1
  4. package/dist/webpack/configs/loaders/less-loader.js +1 -1
  5. package/dist/webpack/configs/loaders/less-loader.js.map +1 -1
  6. package/dist/webpack/configs/loaders/style-loader.js +1 -1
  7. package/dist/webpack/configs/loaders/style-loader.js.map +1 -1
  8. package/dist/webpack/configs/rules/js-rules.js +3 -3
  9. package/dist/webpack/configs/rules/js-rules.js.map +1 -1
  10. package/dist/webpack/configs/rules/scss-rules.js +2 -2
  11. package/dist/webpack/configs/rules/scss-rules.js.map +1 -1
  12. package/dist/webpack/configs/rules/svg-rules.js +1 -1
  13. package/dist/webpack/configs/rules/svg-rules.js.map +1 -1
  14. package/package.json +11 -11
  15. package/src/webpack/__mocks__/file-rules.ts +3 -3
  16. package/src/webpack/__mocks__/style-rules.ts +23 -16
  17. package/src/webpack/__tests__/create-webpack-config.test.ts +1 -1
  18. package/src/webpack/configs/loaders/css-loader.ts +1 -1
  19. package/src/webpack/configs/loaders/less-loader.ts +1 -1
  20. package/src/webpack/configs/loaders/style-loader.ts +1 -1
  21. package/src/webpack/configs/rules/js-rules.ts +3 -3
  22. package/src/webpack/configs/rules/scss-rules.ts +2 -2
  23. package/src/webpack/configs/rules/svg-rules.ts +1 -1
  24. package/dist/cli/commands/coverage-finalize.d.ts +0 -16
  25. package/dist/cli/commands/coverage-finalize.d.ts.map +0 -1
  26. package/dist/cli/commands/coverage-finalize.js +0 -41
  27. package/dist/cli/commands/coverage-finalize.js.map +0 -1
  28. package/dist/cli/commands/registry/coverage-finalize.d.ts +0 -5
  29. package/dist/cli/commands/registry/coverage-finalize.d.ts.map +0 -1
  30. package/dist/cli/commands/registry/coverage-finalize.js +0 -17
  31. package/dist/cli/commands/registry/coverage-finalize.js.map +0 -1
  32. package/dist/utils/default-excludes.d.ts +0 -14
  33. package/dist/utils/default-excludes.d.ts.map +0 -1
  34. package/dist/utils/default-excludes.js +0 -23
  35. package/dist/utils/default-excludes.js.map +0 -1
  36. package/dist/utils/get-coverage-aliases.d.ts +0 -23
  37. package/dist/utils/get-coverage-aliases.d.ts.map +0 -1
  38. package/dist/utils/get-coverage-aliases.js +0 -41
  39. package/dist/utils/get-coverage-aliases.js.map +0 -1
  40. package/dist/utils/get-coverage-source-patterns.d.ts +0 -21
  41. package/dist/utils/get-coverage-source-patterns.d.ts.map +0 -1
  42. package/dist/utils/get-coverage-source-patterns.js +0 -39
  43. package/dist/utils/get-coverage-source-patterns.js.map +0 -1
  44. package/dist/utils/get-default-excludes.d.ts +0 -14
  45. package/dist/utils/get-default-excludes.d.ts.map +0 -1
  46. package/dist/utils/get-default-excludes.js +0 -22
  47. package/dist/utils/get-default-excludes.js.map +0 -1
  48. package/dist/webpack/configs/constants.d.ts +0 -2
  49. package/dist/webpack/configs/constants.d.ts.map +0 -1
  50. package/dist/webpack/configs/constants.js +0 -13
  51. package/dist/webpack/configs/constants.js.map +0 -1
  52. package/dist/webpack/configs/rules/ts-coverage-rules.d.ts +0 -22
  53. package/dist/webpack/configs/rules/ts-coverage-rules.d.ts.map +0 -1
  54. package/dist/webpack/configs/rules/ts-coverage-rules.js +0 -48
  55. package/dist/webpack/configs/rules/ts-coverage-rules.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { Context } from '../types';
2
2
  import { LoaderOptions } from './types';
3
- export declare function cssLoader({ isProduction }: Context, { esModule }?: LoaderOptions): "css-loader" | {
3
+ export declare function cssLoader({ isProduction }: Context, { esModule }?: LoaderOptions): string | {
4
4
  loader: string;
5
5
  options: {
6
6
  esModule: true;
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "cssLoader", {
9
9
  }
10
10
  });
11
11
  function cssLoader({ isProduction }, { esModule } = {}) {
12
- const loader = 'css-loader';
12
+ const loader = require.resolve('css-loader');
13
13
  return esModule ? {
14
14
  loader,
15
15
  options: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/webpack/configs/loaders/css-loader.ts"],"sourcesContent":["import { Context } from '../types';\nimport { LoaderOptions } from './types';\n\nexport function cssLoader({ isProduction }: Context, { esModule }: LoaderOptions = {}) {\n const loader = 'css-loader';\n return esModule\n ? {\n loader,\n options: {\n esModule,\n modules: {\n ...(isProduction ? { localIdentName: '[local]__[hash:base64:5]' } : {}),\n exportLocalsConvention: 'camelCaseOnly',\n namedExport: true,\n },\n },\n }\n : loader;\n}\n"],"names":["cssLoader","isProduction","esModule","loader","options","modules","localIdentName","exportLocalsConvention","namedExport"],"mappings":";;;;+BAGgBA;;;eAAAA;;;AAAT,SAASA,UAAU,EAAEC,YAAY,EAAW,EAAE,EAAEC,QAAQ,EAAiB,GAAG,CAAC,CAAC;IACjF,MAAMC,SAAS;IACf,OAAOD,WACD;QACIC;QACAC,SAAS;YACLF;YACAG,SAAS;gBACL,GAAIJ,eAAe;oBAAEK,gBAAgB;gBAA2B,IAAI,CAAC,CAAC;gBACtEC,wBAAwB;gBACxBC,aAAa;YACjB;QACJ;IACJ,IACAL;AACV"}
1
+ {"version":3,"sources":["../../../../src/webpack/configs/loaders/css-loader.ts"],"sourcesContent":["import { Context } from '../types';\nimport { LoaderOptions } from './types';\n\nexport function cssLoader({ isProduction }: Context, { esModule }: LoaderOptions = {}) {\n const loader = require.resolve('css-loader');\n return esModule\n ? {\n loader,\n options: {\n esModule,\n modules: {\n ...(isProduction ? { localIdentName: '[local]__[hash:base64:5]' } : {}),\n exportLocalsConvention: 'camelCaseOnly',\n namedExport: true,\n },\n },\n }\n : loader;\n}\n"],"names":["cssLoader","isProduction","esModule","loader","require","resolve","options","modules","localIdentName","exportLocalsConvention","namedExport"],"mappings":";;;;+BAGgBA;;;eAAAA;;;AAAT,SAASA,UAAU,EAAEC,YAAY,EAAW,EAAE,EAAEC,QAAQ,EAAiB,GAAG,CAAC,CAAC;IACjF,MAAMC,SAASC,QAAQC,OAAO,CAAC;IAC/B,OAAOH,WACD;QACIC;QACAG,SAAS;YACLJ;YACAK,SAAS;gBACL,GAAIN,eAAe;oBAAEO,gBAAgB;gBAA2B,IAAI,CAAC,CAAC;gBACtEC,wBAAwB;gBACxBC,aAAa;YACjB;QACJ;IACJ,IACAP;AACV"}
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "lessLoader", {
10
10
  });
11
11
  function lessLoader() {
12
12
  return {
13
- loader: 'less-loader',
13
+ loader: require.resolve('less-loader'),
14
14
  options: {
15
15
  lessOptions: {
16
16
  math: 'always'
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/webpack/configs/loaders/less-loader.ts"],"sourcesContent":["export function lessLoader() {\n return { loader: 'less-loader', options: { lessOptions: { math: 'always' } } };\n}\n"],"names":["lessLoader","loader","options","lessOptions","math"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA;IACZ,OAAO;QAAEC,QAAQ;QAAeC,SAAS;YAAEC,aAAa;gBAAEC,MAAM;YAAS;QAAE;IAAE;AACjF"}
1
+ {"version":3,"sources":["../../../../src/webpack/configs/loaders/less-loader.ts"],"sourcesContent":["export function lessLoader() {\n return { loader: require.resolve('less-loader'), options: { lessOptions: { math: 'always' } } };\n}\n"],"names":["lessLoader","loader","require","resolve","options","lessOptions","math"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA;IACZ,OAAO;QAAEC,QAAQC,QAAQC,OAAO,CAAC;QAAgBC,SAAS;YAAEC,aAAa;gBAAEC,MAAM;YAAS;QAAE;IAAE;AAClG"}
@@ -15,7 +15,7 @@ function _interop_require_default(obj) {
15
15
  };
16
16
  }
17
17
  function styleLoader({ isProduction, isWebComponent, emitExposedDependencies }, { esModule } = {}) {
18
- const loader = isProduction || isWebComponent || emitExposedDependencies ? _minicssextractplugin.default.loader : 'style-loader';
18
+ const loader = isProduction || isWebComponent || emitExposedDependencies ? _minicssextractplugin.default.loader : require.resolve('style-loader');
19
19
  return esModule ? {
20
20
  loader,
21
21
  options: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/webpack/configs/loaders/style-loader.ts"],"sourcesContent":["import MiniCssExtractPlugin from 'mini-css-extract-plugin';\nimport { Context } from '../types';\nimport { LoaderOptions } from './types';\n\nexport function styleLoader(\n { isProduction, isWebComponent, emitExposedDependencies }: Context,\n { esModule }: LoaderOptions = {}\n) {\n const loader =\n isProduction || isWebComponent || emitExposedDependencies\n ? MiniCssExtractPlugin.loader\n : 'style-loader';\n return esModule ? { loader, options: { esModule } } : loader;\n}\n"],"names":["styleLoader","isProduction","isWebComponent","emitExposedDependencies","esModule","loader","MiniCssExtractPlugin","options"],"mappings":";;;;+BAIgBA;;;eAAAA;;;6EAJiB;;;;;;AAI1B,SAASA,YACZ,EAAEC,YAAY,EAAEC,cAAc,EAAEC,uBAAuB,EAAW,EAClE,EAAEC,QAAQ,EAAiB,GAAG,CAAC,CAAC;IAEhC,MAAMC,SACFJ,gBAAgBC,kBAAkBC,0BAC5BG,6BAAoB,CAACD,MAAM,GAC3B;IACV,OAAOD,WAAW;QAAEC;QAAQE,SAAS;YAAEH;QAAS;IAAE,IAAIC;AAC1D"}
1
+ {"version":3,"sources":["../../../../src/webpack/configs/loaders/style-loader.ts"],"sourcesContent":["import MiniCssExtractPlugin from 'mini-css-extract-plugin';\nimport { Context } from '../types';\nimport { LoaderOptions } from './types';\n\nexport function styleLoader(\n { isProduction, isWebComponent, emitExposedDependencies }: Context,\n { esModule }: LoaderOptions = {}\n) {\n const loader =\n isProduction || isWebComponent || emitExposedDependencies\n ? MiniCssExtractPlugin.loader\n : require.resolve('style-loader');\n return esModule ? { loader, options: { esModule } } : loader;\n}\n"],"names":["styleLoader","isProduction","isWebComponent","emitExposedDependencies","esModule","loader","MiniCssExtractPlugin","require","resolve","options"],"mappings":";;;;+BAIgBA;;;eAAAA;;;6EAJiB;;;;;;AAI1B,SAASA,YACZ,EAAEC,YAAY,EAAEC,cAAc,EAAEC,uBAAuB,EAAW,EAClE,EAAEC,QAAQ,EAAiB,GAAG,CAAC,CAAC;IAEhC,MAAMC,SACFJ,gBAAgBC,kBAAkBC,0BAC5BG,6BAAoB,CAACD,MAAM,GAC3BE,QAAQC,OAAO,CAAC;IAC1B,OAAOJ,WAAW;QAAEC;QAAQI,SAAS;YAAEL;QAAS;IAAE,IAAIC;AAC1D"}
@@ -20,7 +20,7 @@ function jsRules({ codeCoverage, destination }) {
20
20
  enforce: 'pre',
21
21
  test: /\.js$/,
22
22
  exclude: /node_modules/,
23
- loader: 'source-map-loader'
23
+ loader: require.resolve('source-map-loader')
24
24
  },
25
25
  {
26
26
  test: /\.js$/,
@@ -31,7 +31,7 @@ function jsRules({ codeCoverage, destination }) {
31
31
  {
32
32
  test: /\.worker\.js$/,
33
33
  use: {
34
- loader: 'worker-loader'
34
+ loader: require.resolve('worker-loader')
35
35
  }
36
36
  }
37
37
  ];
@@ -44,7 +44,7 @@ function jsRules({ codeCoverage, destination }) {
44
44
  ],
45
45
  exclude: /node_modules/,
46
46
  use: {
47
- loader: '@jsdevtools/coverage-istanbul-loader',
47
+ loader: require.resolve('@jsdevtools/coverage-istanbul-loader'),
48
48
  options: {
49
49
  compact: false,
50
50
  produceSourceMap: true
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/webpack/configs/rules/js-rules.ts"],"sourcesContent":["import path from 'path';\nimport { RuleSetRule } from 'webpack';\nimport { Context } from '../types';\n\nexport function jsRules({ codeCoverage, destination }: Context): RuleSetRule[] {\n const result: RuleSetRule[] = [\n {\n enforce: 'pre',\n test: /\\.js$/,\n exclude: /node_modules/,\n loader: 'source-map-loader',\n },\n {\n test: /\\.js$/,\n resolve: {\n fullySpecified: false,\n },\n },\n {\n test: /\\.worker\\.js$/,\n use: { loader: 'worker-loader' },\n },\n ];\n\n if (codeCoverage) {\n result.push({\n enforce: 'post',\n test: /\\.js$/,\n include: [path.resolve(destination)],\n exclude: /node_modules/,\n use: {\n loader: '@jsdevtools/coverage-istanbul-loader',\n options: {\n compact: false,\n produceSourceMap: true,\n },\n },\n });\n }\n\n return result;\n}\n"],"names":["jsRules","codeCoverage","destination","result","enforce","test","exclude","loader","resolve","fullySpecified","use","push","include","path","options","compact","produceSourceMap"],"mappings":";;;;+BAIgBA;;;eAAAA;;;6DAJC;;;;;;AAIV,SAASA,QAAQ,EAAEC,YAAY,EAAEC,WAAW,EAAW;IAC1D,MAAMC,SAAwB;QAC1B;YACIC,SAAS;YACTC,MAAM;YACNC,SAAS;YACTC,QAAQ;QACZ;QACA;YACIF,MAAM;YACNG,SAAS;gBACLC,gBAAgB;YACpB;QACJ;QACA;YACIJ,MAAM;YACNK,KAAK;gBAAEH,QAAQ;YAAgB;QACnC;KACH;IAED,IAAIN,cAAc;QACdE,OAAOQ,IAAI,CAAC;YACRP,SAAS;YACTC,MAAM;YACNO,SAAS;gBAACC,aAAI,CAACL,OAAO,CAACN;aAAa;YACpCI,SAAS;YACTI,KAAK;gBACDH,QAAQ;gBACRO,SAAS;oBACLC,SAAS;oBACTC,kBAAkB;gBACtB;YACJ;QACJ;IACJ;IAEA,OAAOb;AACX"}
1
+ {"version":3,"sources":["../../../../src/webpack/configs/rules/js-rules.ts"],"sourcesContent":["import path from 'path';\nimport { RuleSetRule } from 'webpack';\nimport { Context } from '../types';\n\nexport function jsRules({ codeCoverage, destination }: Context): RuleSetRule[] {\n const result: RuleSetRule[] = [\n {\n enforce: 'pre',\n test: /\\.js$/,\n exclude: /node_modules/,\n loader: require.resolve('source-map-loader'),\n },\n {\n test: /\\.js$/,\n resolve: {\n fullySpecified: false,\n },\n },\n {\n test: /\\.worker\\.js$/,\n use: { loader: require.resolve('worker-loader') },\n },\n ];\n\n if (codeCoverage) {\n result.push({\n enforce: 'post',\n test: /\\.js$/,\n include: [path.resolve(destination)],\n exclude: /node_modules/,\n use: {\n loader: require.resolve('@jsdevtools/coverage-istanbul-loader'),\n options: {\n compact: false,\n produceSourceMap: true,\n },\n },\n });\n }\n\n return result;\n}\n"],"names":["jsRules","codeCoverage","destination","result","enforce","test","exclude","loader","require","resolve","fullySpecified","use","push","include","path","options","compact","produceSourceMap"],"mappings":";;;;+BAIgBA;;;eAAAA;;;6DAJC;;;;;;AAIV,SAASA,QAAQ,EAAEC,YAAY,EAAEC,WAAW,EAAW;IAC1D,MAAMC,SAAwB;QAC1B;YACIC,SAAS;YACTC,MAAM;YACNC,SAAS;YACTC,QAAQC,QAAQC,OAAO,CAAC;QAC5B;QACA;YACIJ,MAAM;YACNI,SAAS;gBACLC,gBAAgB;YACpB;QACJ;QACA;YACIL,MAAM;YACNM,KAAK;gBAAEJ,QAAQC,QAAQC,OAAO,CAAC;YAAiB;QACpD;KACH;IAED,IAAIR,cAAc;QACdE,OAAOS,IAAI,CAAC;YACRR,SAAS;YACTC,MAAM;YACNQ,SAAS;gBAACC,aAAI,CAACL,OAAO,CAACP;aAAa;YACpCI,SAAS;YACTK,KAAK;gBACDJ,QAAQC,QAAQC,OAAO,CAAC;gBACxBM,SAAS;oBACLC,SAAS;oBACTC,kBAAkB;gBACtB;YACJ;QACJ;IACJ;IAEA,OAAOd;AACX"}
@@ -20,7 +20,7 @@ function scssRules(context) {
20
20
  (0, _loaders.cssLoader)(context, {
21
21
  esModule: true
22
22
  }),
23
- 'sass-loader'
23
+ require.resolve('sass-loader')
24
24
  ]
25
25
  },
26
26
  {
@@ -29,7 +29,7 @@ function scssRules(context) {
29
29
  use: [
30
30
  (0, _loaders.styleLoader)(context),
31
31
  (0, _loaders.cssLoader)(context),
32
- 'sass-loader'
32
+ require.resolve('sass-loader')
33
33
  ]
34
34
  }
35
35
  ];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/webpack/configs/rules/scss-rules.ts"],"sourcesContent":["import { RuleSetRule } from 'webpack';\nimport { cssLoader, styleLoader } from '../loaders';\nimport { Context } from '../types';\n\nexport function scssRules(context: Context): RuleSetRule[] {\n return [\n {\n test: /\\.module.scss$/,\n use: [\n styleLoader(context, { esModule: true }),\n cssLoader(context, { esModule: true }),\n 'sass-loader',\n ],\n },\n {\n test: /(\\.scss)$/,\n exclude: /\\.module.scss$/,\n use: [styleLoader(context), cssLoader(context), 'sass-loader'],\n },\n ];\n}\n"],"names":["scssRules","context","test","use","styleLoader","esModule","cssLoader","exclude"],"mappings":";;;;+BAIgBA;;;eAAAA;;;yBAHuB;AAGhC,SAASA,UAAUC,OAAgB;IACtC,OAAO;QACH;YACIC,MAAM;YACNC,KAAK;gBACDC,IAAAA,oBAAW,EAACH,SAAS;oBAAEI,UAAU;gBAAK;gBACtCC,IAAAA,kBAAS,EAACL,SAAS;oBAAEI,UAAU;gBAAK;gBACpC;aACH;QACL;QACA;YACIH,MAAM;YACNK,SAAS;YACTJ,KAAK;gBAACC,IAAAA,oBAAW,EAACH;gBAAUK,IAAAA,kBAAS,EAACL;gBAAU;aAAc;QAClE;KACH;AACL"}
1
+ {"version":3,"sources":["../../../../src/webpack/configs/rules/scss-rules.ts"],"sourcesContent":["import { RuleSetRule } from 'webpack';\nimport { cssLoader, styleLoader } from '../loaders';\nimport { Context } from '../types';\n\nexport function scssRules(context: Context): RuleSetRule[] {\n return [\n {\n test: /\\.module.scss$/,\n use: [\n styleLoader(context, { esModule: true }),\n cssLoader(context, { esModule: true }),\n require.resolve('sass-loader'),\n ],\n },\n {\n test: /(\\.scss)$/,\n exclude: /\\.module.scss$/,\n use: [styleLoader(context), cssLoader(context), require.resolve('sass-loader')],\n },\n ];\n}\n"],"names":["scssRules","context","test","use","styleLoader","esModule","cssLoader","require","resolve","exclude"],"mappings":";;;;+BAIgBA;;;eAAAA;;;yBAHuB;AAGhC,SAASA,UAAUC,OAAgB;IACtC,OAAO;QACH;YACIC,MAAM;YACNC,KAAK;gBACDC,IAAAA,oBAAW,EAACH,SAAS;oBAAEI,UAAU;gBAAK;gBACtCC,IAAAA,kBAAS,EAACL,SAAS;oBAAEI,UAAU;gBAAK;gBACpCE,QAAQC,OAAO,CAAC;aACnB;QACL;QACA;YACIN,MAAM;YACNO,SAAS;YACTN,KAAK;gBAACC,IAAAA,oBAAW,EAACH;gBAAUK,IAAAA,kBAAS,EAACL;gBAAUM,QAAQC,OAAO,CAAC;aAAe;QACnF;KACH;AACL"}
@@ -12,7 +12,7 @@ function svgRules(_) {
12
12
  // Using [\\\/] because Windows uses backslash as path separator
13
13
  const librariesRegEx = /node_modules[\\\/]@servicetitan[\\\/]anvil2/;
14
14
  const SVGRLoader = {
15
- loader: '@svgr/webpack',
15
+ loader: require.resolve('@svgr/webpack'),
16
16
  options: {
17
17
  svgoConfig: {
18
18
  plugins: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/webpack/configs/rules/svg-rules.ts"],"sourcesContent":["import { RuleSetRule } from 'webpack';\nimport { Context } from '../types';\n\nexport function svgRules(_: Context): RuleSetRule[] {\n // Using [\\\\\\/] because Windows uses backslash as path separator\n const librariesRegEx = /node_modules[\\\\\\/]@servicetitan[\\\\\\/]anvil2/;\n\n const SVGRLoader = {\n loader: '@svgr/webpack',\n options: {\n svgoConfig: {\n plugins: [\n {\n name: 'preset-default',\n params: {\n overrides: {\n removeViewBox: false,\n },\n },\n },\n ],\n },\n },\n };\n\n return [\n // SVGs not from Anvil 2: *.svg?component -> SVGRLoader, *.svg -> asset\n {\n test: /\\.svg$/i,\n exclude: librariesRegEx,\n resourceQuery: { not: [/component/] }, // exclude *.svg?component\n type: 'asset',\n generator: {\n filename: 'images/[contenthash][ext][query]',\n },\n },\n {\n test: /\\.svg$/i,\n exclude: librariesRegEx,\n resourceQuery: /component/, // *.svg?component\n use: [SVGRLoader],\n },\n // SVGs from Anvil 2: *.svg?asset -> asset, *.svg -> SVGRLoader\n {\n test: /\\.svg$/i,\n include: librariesRegEx,\n resourceQuery: { not: [/asset/] }, // exclude *.svg?asset\n use: [SVGRLoader],\n },\n {\n test: /\\.svg$/i,\n include: librariesRegEx,\n resourceQuery: /asset/, // *.svg?asset\n type: 'asset',\n generator: {\n filename: 'images/[contenthash][ext][query]',\n },\n },\n ];\n}\n"],"names":["svgRules","_","librariesRegEx","SVGRLoader","loader","options","svgoConfig","plugins","name","params","overrides","removeViewBox","test","exclude","resourceQuery","not","type","generator","filename","use","include"],"mappings":";;;;+BAGgBA;;;eAAAA;;;AAAT,SAASA,SAASC,CAAU;IAC/B,gEAAgE;IAChE,MAAMC,iBAAiB;IAEvB,MAAMC,aAAa;QACfC,QAAQ;QACRC,SAAS;YACLC,YAAY;gBACRC,SAAS;oBACL;wBACIC,MAAM;wBACNC,QAAQ;4BACJC,WAAW;gCACPC,eAAe;4BACnB;wBACJ;oBACJ;iBACH;YACL;QACJ;IACJ;IAEA,OAAO;QACH,uEAAuE;QACvE;YACIC,MAAM;YACNC,SAASX;YACTY,eAAe;gBAAEC,KAAK;oBAAC;iBAAY;YAAC;YACpCC,MAAM;YACNC,WAAW;gBACPC,UAAU;YACd;QACJ;QACA;YACIN,MAAM;YACNC,SAASX;YACTY,eAAe;YACfK,KAAK;gBAAChB;aAAW;QACrB;QACA,+DAA+D;QAC/D;YACIS,MAAM;YACNQ,SAASlB;YACTY,eAAe;gBAAEC,KAAK;oBAAC;iBAAQ;YAAC;YAChCI,KAAK;gBAAChB;aAAW;QACrB;QACA;YACIS,MAAM;YACNQ,SAASlB;YACTY,eAAe;YACfE,MAAM;YACNC,WAAW;gBACPC,UAAU;YACd;QACJ;KACH;AACL"}
1
+ {"version":3,"sources":["../../../../src/webpack/configs/rules/svg-rules.ts"],"sourcesContent":["import { RuleSetRule } from 'webpack';\nimport { Context } from '../types';\n\nexport function svgRules(_: Context): RuleSetRule[] {\n // Using [\\\\\\/] because Windows uses backslash as path separator\n const librariesRegEx = /node_modules[\\\\\\/]@servicetitan[\\\\\\/]anvil2/;\n\n const SVGRLoader = {\n loader: require.resolve('@svgr/webpack'),\n options: {\n svgoConfig: {\n plugins: [\n {\n name: 'preset-default',\n params: {\n overrides: {\n removeViewBox: false,\n },\n },\n },\n ],\n },\n },\n };\n\n return [\n // SVGs not from Anvil 2: *.svg?component -> SVGRLoader, *.svg -> asset\n {\n test: /\\.svg$/i,\n exclude: librariesRegEx,\n resourceQuery: { not: [/component/] }, // exclude *.svg?component\n type: 'asset',\n generator: {\n filename: 'images/[contenthash][ext][query]',\n },\n },\n {\n test: /\\.svg$/i,\n exclude: librariesRegEx,\n resourceQuery: /component/, // *.svg?component\n use: [SVGRLoader],\n },\n // SVGs from Anvil 2: *.svg?asset -> asset, *.svg -> SVGRLoader\n {\n test: /\\.svg$/i,\n include: librariesRegEx,\n resourceQuery: { not: [/asset/] }, // exclude *.svg?asset\n use: [SVGRLoader],\n },\n {\n test: /\\.svg$/i,\n include: librariesRegEx,\n resourceQuery: /asset/, // *.svg?asset\n type: 'asset',\n generator: {\n filename: 'images/[contenthash][ext][query]',\n },\n },\n ];\n}\n"],"names":["svgRules","_","librariesRegEx","SVGRLoader","loader","require","resolve","options","svgoConfig","plugins","name","params","overrides","removeViewBox","test","exclude","resourceQuery","not","type","generator","filename","use","include"],"mappings":";;;;+BAGgBA;;;eAAAA;;;AAAT,SAASA,SAASC,CAAU;IAC/B,gEAAgE;IAChE,MAAMC,iBAAiB;IAEvB,MAAMC,aAAa;QACfC,QAAQC,QAAQC,OAAO,CAAC;QACxBC,SAAS;YACLC,YAAY;gBACRC,SAAS;oBACL;wBACIC,MAAM;wBACNC,QAAQ;4BACJC,WAAW;gCACPC,eAAe;4BACnB;wBACJ;oBACJ;iBACH;YACL;QACJ;IACJ;IAEA,OAAO;QACH,uEAAuE;QACvE;YACIC,MAAM;YACNC,SAASb;YACTc,eAAe;gBAAEC,KAAK;oBAAC;iBAAY;YAAC;YACpCC,MAAM;YACNC,WAAW;gBACPC,UAAU;YACd;QACJ;QACA;YACIN,MAAM;YACNC,SAASb;YACTc,eAAe;YACfK,KAAK;gBAAClB;aAAW;QACrB;QACA,+DAA+D;QAC/D;YACIW,MAAM;YACNQ,SAASpB;YACTc,eAAe;gBAAEC,KAAK;oBAAC;iBAAQ;YAAC;YAChCI,KAAK;gBAAClB;aAAW;QACrB;QACA;YACIW,MAAM;YACNQ,SAASpB;YACTc,eAAe;YACfE,MAAM;YACNC,WAAW;gBACPC,UAAU;YACd;QACJ;KACH;AACL"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/startup",
3
- "version": "36.1.2-canary.6",
3
+ "version": "36.1.2-canary.7",
4
4
  "description": "CLI to create multi-package Lerna projects with TypeScript and React",
5
5
  "homepage": "https://docs.st.dev/docs/frontend/uikit/startup",
6
6
  "repository": {
@@ -97,16 +97,16 @@
97
97
  "@jest/core": "~30.3.0",
98
98
  "@jest/types": "~30.3.0",
99
99
  "@jsdevtools/coverage-istanbul-loader": "^3.0.5",
100
- "@servicetitan/eslint-config": "36.1.1",
101
- "@servicetitan/install": "36.1.2-canary.6",
102
- "@servicetitan/startup-utils": "36.1.1",
103
- "@servicetitan/stylelint-config": "36.1.1",
100
+ "@servicetitan/eslint-config": "36.1.2-canary.7",
101
+ "@servicetitan/install": "36.1.2-canary.7",
102
+ "@servicetitan/startup-utils": "36.1.2-canary.7",
103
+ "@servicetitan/stylelint-config": "36.1.2-canary.7",
104
104
  "@svgr/webpack": "^8.1.0",
105
105
  "@swc/cli": "^0.8.1",
106
106
  "@swc/core": "1.15.24",
107
107
  "@types/debug": "^4.1.12",
108
108
  "@types/jest": "~30.0.0",
109
- "@vitest/coverage-v8": "^4.1.4",
109
+ "@vitest/coverage-v8": "^4.1.5",
110
110
  "chalk": "~4.1.2",
111
111
  "cli-table3": "^0.6.5",
112
112
  "cpx2": "8.0.2",
@@ -117,14 +117,14 @@
117
117
  "eslint": "~9.39.2",
118
118
  "execa": "~5.1.1",
119
119
  "glob": "~13.0.6",
120
- "html-webpack-plugin": "~5.6.6",
120
+ "html-webpack-plugin": "~5.6.7",
121
121
  "html-webpack-tags-plugin": "^3.0.2",
122
122
  "identity-obj-proxy": "~3.0.0",
123
123
  "jest": "~30.3.0",
124
124
  "jest-circus": "~30.3.0",
125
125
  "jest-environment-jsdom": "^30.3.0",
126
126
  "jest-fetch-mock": "~3.0.3",
127
- "js-yaml": "~4.1.0",
127
+ "js-yaml": "~4.1.1",
128
128
  "json5": "^2.2.3",
129
129
  "lerna": "~9.0.7",
130
130
  "less": "~4.6.4",
@@ -132,7 +132,7 @@
132
132
  "less-plugin-npm-import": "~2.1.0",
133
133
  "lodash.kebabcase": "^4.1.1",
134
134
  "lodash.memoize": "^4.1.2",
135
- "memfs": "~4.57.1",
135
+ "memfs": "~4.57.2",
136
136
  "mini-css-extract-plugin": "~2.10.2",
137
137
  "moment-locales-webpack-plugin": "~1.2.0",
138
138
  "multimatch": "~8.0.0",
@@ -148,12 +148,12 @@
148
148
  "stylelint": "~16.26.1",
149
149
  "swc-loader": "^0.2.7",
150
150
  "terminal-link": "^5.0.0",
151
- "terser-webpack-plugin": "^5.4.0",
151
+ "terser-webpack-plugin": "^5.5.0",
152
152
  "ts-jest": "29.4.9",
153
153
  "ts-node": "~10.9.2",
154
154
  "typed-css-modules": "~0.9.1",
155
155
  "typescript": "5.9.3",
156
- "vitest": "^4.1.4",
156
+ "vitest": "^4.1.5",
157
157
  "webpack": "~5.106.2",
158
158
  "webpack-assets-manifest": "~6.5.1",
159
159
  "webpack-bundle-analyzer": "^5.3.0",
@@ -2,7 +2,7 @@ import { RuleSetRule } from 'webpack';
2
2
 
3
3
  const svgLibrariesRegEx = /node_modules[\\\/]@servicetitan[\\\/]anvil2/;
4
4
  const SVGRLoader = {
5
- loader: '@svgr/webpack',
5
+ loader: require.resolve('@svgr/webpack'),
6
6
  options: {
7
7
  svgoConfig: {
8
8
  plugins: [
@@ -24,11 +24,11 @@ export const fileRules: Record<string, RuleSetRule> = {
24
24
  test: /\.js$/,
25
25
  enforce: 'pre',
26
26
  exclude: /node_modules/,
27
- loader: 'source-map-loader',
27
+ loader: require.resolve('source-map-loader'),
28
28
  },
29
29
  '.worker.js': {
30
30
  test: /\.worker\.js$/,
31
- use: { loader: 'worker-loader' },
31
+ use: { loader: require.resolve('worker-loader') },
32
32
  },
33
33
  'images': {
34
34
  test: /\.(png|jpg|jpeg|gif)$/i,
@@ -1,27 +1,34 @@
1
1
  import MiniCssExtractPlugin from 'mini-css-extract-plugin';
2
2
  import { RuleSetRule } from 'webpack';
3
3
 
4
+ const cssLoaderPath = require.resolve('css-loader');
5
+ const styleLoaderPath = require.resolve('style-loader');
6
+
4
7
  export type StyleRule = RuleSetRule & { use: (string | object)[] };
5
8
 
6
9
  export const styleRules: Record<string, StyleRule> = {
7
10
  '.css': {
8
11
  test: /(\.css)$/,
9
12
  exclude: /\.module.css$/,
10
- use: ['style-loader', 'css-loader'],
13
+ use: [require.resolve('style-loader'), require.resolve('css-loader')],
11
14
  },
12
15
  '.scss': {
13
16
  test: /(\.scss)$/,
14
17
  exclude: /\.module.scss$/,
15
- use: ['style-loader', 'css-loader', 'sass-loader'],
18
+ use: [
19
+ require.resolve('style-loader'),
20
+ require.resolve('css-loader'),
21
+ require.resolve('sass-loader'),
22
+ ],
16
23
  },
17
24
  '.less': {
18
25
  test: /(\.less)$/,
19
26
  exclude: /\.module.less$/,
20
27
  use: [
21
- 'style-loader',
22
- 'css-loader',
28
+ require.resolve('style-loader'),
29
+ require.resolve('css-loader'),
23
30
  {
24
- loader: 'less-loader',
31
+ loader: require.resolve('less-loader'),
25
32
  options: { lessOptions: { math: 'always' } },
26
33
  },
27
34
  ],
@@ -30,11 +37,11 @@ export const styleRules: Record<string, StyleRule> = {
30
37
  test: /\.module.css$/,
31
38
  use: [
32
39
  {
33
- loader: 'style-loader',
40
+ loader: require.resolve('style-loader'),
34
41
  options: { esModule: true },
35
42
  },
36
43
  {
37
- loader: 'css-loader',
44
+ loader: require.resolve('css-loader'),
38
45
  options: {
39
46
  esModule: true,
40
47
  modules: { exportLocalsConvention: 'camelCaseOnly', namedExport: true },
@@ -46,35 +53,35 @@ export const styleRules: Record<string, StyleRule> = {
46
53
  test: /\.module.scss$/,
47
54
  use: [
48
55
  {
49
- loader: 'style-loader',
56
+ loader: require.resolve('style-loader'),
50
57
  options: { esModule: true },
51
58
  },
52
59
  {
53
- loader: 'css-loader',
60
+ loader: require.resolve('css-loader'),
54
61
  options: {
55
62
  esModule: true,
56
63
  modules: { exportLocalsConvention: 'camelCaseOnly', namedExport: true },
57
64
  },
58
65
  },
59
- 'sass-loader',
66
+ require.resolve('sass-loader'),
60
67
  ],
61
68
  },
62
69
  '.module.less': {
63
70
  test: /\.module.less$/,
64
71
  use: [
65
72
  {
66
- loader: 'style-loader',
73
+ loader: require.resolve('style-loader'),
67
74
  options: { esModule: true },
68
75
  },
69
76
  {
70
- loader: 'css-loader',
77
+ loader: require.resolve('css-loader'),
71
78
  options: {
72
79
  esModule: true,
73
80
  modules: { exportLocalsConvention: 'camelCaseOnly', namedExport: true },
74
81
  },
75
82
  },
76
83
  {
77
- loader: 'less-loader',
84
+ loader: require.resolve('less-loader'),
78
85
  options: { lessOptions: { math: 'always' } },
79
86
  },
80
87
  ],
@@ -105,7 +112,7 @@ export const productionStyleRules = Object.entries(miniCssPluginStyleRules).redu
105
112
  * Adds options.modules.localIdentName
106
113
  */
107
114
  function transformCssLoader(loader: string | Record<string, any>) {
108
- if (typeof loader === 'object' && loader.loader === 'css-loader' && loader.options?.modules) {
115
+ if (typeof loader === 'object' && loader.loader === cssLoaderPath && loader.options?.modules) {
109
116
  const options = loader.options;
110
117
  const modules = { ...options.modules, localIdentName: '[local]__[hash:base64:5]' };
111
118
  return { ...loader, options: { ...options, modules } };
@@ -117,11 +124,11 @@ function transformCssLoader(loader: string | Record<string, any>) {
117
124
  * Replaces "style-loader" with MiniCssExtractPlugin.loader
118
125
  */
119
126
  function transformStyleLoader(loader: string | Record<string, any>) {
120
- if (loader === 'style-loader') {
127
+ if (loader === styleLoaderPath) {
121
128
  return MiniCssExtractPlugin.loader;
122
129
  }
123
130
 
124
- if (typeof loader === 'object' && loader.loader === 'style-loader') {
131
+ if (typeof loader === 'object' && loader.loader === styleLoaderPath) {
125
132
  return { ...loader, loader: MiniCssExtractPlugin.loader };
126
133
  }
127
134
 
@@ -424,7 +424,7 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
424
424
  include: [path.resolve(destination)],
425
425
  exclude: /node_modules/,
426
426
  use: expect.objectContaining({
427
- loader: '@jsdevtools/coverage-istanbul-loader',
427
+ loader: require.resolve('@jsdevtools/coverage-istanbul-loader'),
428
428
  options: {
429
429
  compact: false,
430
430
  produceSourceMap: true,
@@ -2,7 +2,7 @@ import { Context } from '../types';
2
2
  import { LoaderOptions } from './types';
3
3
 
4
4
  export function cssLoader({ isProduction }: Context, { esModule }: LoaderOptions = {}) {
5
- const loader = 'css-loader';
5
+ const loader = require.resolve('css-loader');
6
6
  return esModule
7
7
  ? {
8
8
  loader,
@@ -1,3 +1,3 @@
1
1
  export function lessLoader() {
2
- return { loader: 'less-loader', options: { lessOptions: { math: 'always' } } };
2
+ return { loader: require.resolve('less-loader'), options: { lessOptions: { math: 'always' } } };
3
3
  }
@@ -9,6 +9,6 @@ export function styleLoader(
9
9
  const loader =
10
10
  isProduction || isWebComponent || emitExposedDependencies
11
11
  ? MiniCssExtractPlugin.loader
12
- : 'style-loader';
12
+ : require.resolve('style-loader');
13
13
  return esModule ? { loader, options: { esModule } } : loader;
14
14
  }
@@ -8,7 +8,7 @@ export function jsRules({ codeCoverage, destination }: Context): RuleSetRule[] {
8
8
  enforce: 'pre',
9
9
  test: /\.js$/,
10
10
  exclude: /node_modules/,
11
- loader: 'source-map-loader',
11
+ loader: require.resolve('source-map-loader'),
12
12
  },
13
13
  {
14
14
  test: /\.js$/,
@@ -18,7 +18,7 @@ export function jsRules({ codeCoverage, destination }: Context): RuleSetRule[] {
18
18
  },
19
19
  {
20
20
  test: /\.worker\.js$/,
21
- use: { loader: 'worker-loader' },
21
+ use: { loader: require.resolve('worker-loader') },
22
22
  },
23
23
  ];
24
24
 
@@ -29,7 +29,7 @@ export function jsRules({ codeCoverage, destination }: Context): RuleSetRule[] {
29
29
  include: [path.resolve(destination)],
30
30
  exclude: /node_modules/,
31
31
  use: {
32
- loader: '@jsdevtools/coverage-istanbul-loader',
32
+ loader: require.resolve('@jsdevtools/coverage-istanbul-loader'),
33
33
  options: {
34
34
  compact: false,
35
35
  produceSourceMap: true,
@@ -9,13 +9,13 @@ export function scssRules(context: Context): RuleSetRule[] {
9
9
  use: [
10
10
  styleLoader(context, { esModule: true }),
11
11
  cssLoader(context, { esModule: true }),
12
- 'sass-loader',
12
+ require.resolve('sass-loader'),
13
13
  ],
14
14
  },
15
15
  {
16
16
  test: /(\.scss)$/,
17
17
  exclude: /\.module.scss$/,
18
- use: [styleLoader(context), cssLoader(context), 'sass-loader'],
18
+ use: [styleLoader(context), cssLoader(context), require.resolve('sass-loader')],
19
19
  },
20
20
  ];
21
21
  }
@@ -6,7 +6,7 @@ export function svgRules(_: Context): RuleSetRule[] {
6
6
  const librariesRegEx = /node_modules[\\\/]@servicetitan[\\\/]anvil2/;
7
7
 
8
8
  const SVGRLoader = {
9
- loader: '@svgr/webpack',
9
+ loader: require.resolve('@svgr/webpack'),
10
10
  options: {
11
11
  svgoConfig: {
12
12
  plugins: [
@@ -1,16 +0,0 @@
1
- import type { entry } from './registry/coverage-finalize';
2
- import { Command } from './types';
3
- /**
4
- * Copies .nyc_output/out.json to coverage/coverage-final.json.
5
- *
6
- * The `publish-frontend-test-coverage` GHA workflow expects every test command
7
- * to produce coverage/coverage-final.json so it can be uploaded as an artifact
8
- * and merged with `npx nyc merge`.
9
- *
10
- * Run this after cypress component or e2e tests complete, instead of the
11
- * manual `node scripts/remap-coverage.js && nyc report --reporter=json` steps.
12
- */
13
- export declare class CoverageFinalize extends Command<typeof entry> {
14
- execute(): Promise<void>;
15
- }
16
- //# sourceMappingURL=coverage-finalize.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coverage-finalize.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/coverage-finalize.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAKlC;;;;;;;;;GASG;AACH,qBAAa,gBAAiB,SAAQ,OAAO,CAAC,OAAO,KAAK,CAAC;IACjD,OAAO;CAiBhB"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "CoverageFinalize", {
6
- enumerable: true,
7
- get: function() {
8
- return CoverageFinalize;
9
- }
10
- });
11
- const _nodefs = /*#__PURE__*/ _interop_require_default(require("node:fs"));
12
- const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
13
- const _utils = require("../../utils");
14
- const _types = require("./types");
15
- function _interop_require_default(obj) {
16
- return obj && obj.__esModule ? obj : {
17
- default: obj
18
- };
19
- }
20
- const INPUT_PATH = _nodepath.default.join('.nyc_output', 'out.json');
21
- const OUTPUT_PATH = _nodepath.default.join('coverage', 'coverage-final.json');
22
- class CoverageFinalize extends _types.Command {
23
- async execute() {
24
- if (!_nodefs.default.existsSync(INPUT_PATH)) {
25
- _utils.log.error(`Coverage file not found: ${INPUT_PATH}`);
26
- process.exit(1);
27
- }
28
- const outputDir = _nodepath.default.dirname(OUTPUT_PATH);
29
- if (!_nodefs.default.existsSync(outputDir)) {
30
- _nodefs.default.mkdirSync(outputDir, {
31
- recursive: true
32
- });
33
- }
34
- _nodefs.default.copyFileSync(INPUT_PATH, OUTPUT_PATH);
35
- const data = JSON.parse(_nodefs.default.readFileSync(OUTPUT_PATH, 'utf8'));
36
- const fileCount = Object.keys(data).length;
37
- _utils.log.info(`Coverage finalized: ${fileCount} files → ${OUTPUT_PATH}`);
38
- }
39
- }
40
-
41
- //# sourceMappingURL=coverage-finalize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/cli/commands/coverage-finalize.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { log } from '../../utils';\nimport type { entry } from './registry/coverage-finalize';\nimport { Command } from './types';\n\nconst INPUT_PATH = path.join('.nyc_output', 'out.json');\nconst OUTPUT_PATH = path.join('coverage', 'coverage-final.json');\n\n/**\n * Copies .nyc_output/out.json to coverage/coverage-final.json.\n *\n * The `publish-frontend-test-coverage` GHA workflow expects every test command\n * to produce coverage/coverage-final.json so it can be uploaded as an artifact\n * and merged with `npx nyc merge`.\n *\n * Run this after cypress component or e2e tests complete, instead of the\n * manual `node scripts/remap-coverage.js && nyc report --reporter=json` steps.\n */\nexport class CoverageFinalize extends Command<typeof entry> {\n async execute() {\n if (!fs.existsSync(INPUT_PATH)) {\n log.error(`Coverage file not found: ${INPUT_PATH}`);\n process.exit(1);\n }\n\n const outputDir = path.dirname(OUTPUT_PATH);\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n fs.copyFileSync(INPUT_PATH, OUTPUT_PATH);\n\n const data = JSON.parse(fs.readFileSync(OUTPUT_PATH, 'utf8'));\n const fileCount = Object.keys(data).length;\n log.info(`Coverage finalized: ${fileCount} files → ${OUTPUT_PATH}`);\n }\n}\n"],"names":["CoverageFinalize","INPUT_PATH","path","join","OUTPUT_PATH","Command","execute","fs","existsSync","log","error","process","exit","outputDir","dirname","mkdirSync","recursive","copyFileSync","data","JSON","parse","readFileSync","fileCount","Object","keys","length","info"],"mappings":";;;;+BAmBaA;;;eAAAA;;;+DAnBE;iEACE;uBACG;uBAEI;;;;;;AAExB,MAAMC,aAAaC,iBAAI,CAACC,IAAI,CAAC,eAAe;AAC5C,MAAMC,cAAcF,iBAAI,CAACC,IAAI,CAAC,YAAY;AAYnC,MAAMH,yBAAyBK,cAAO;IACzC,MAAMC,UAAU;QACZ,IAAI,CAACC,eAAE,CAACC,UAAU,CAACP,aAAa;YAC5BQ,UAAG,CAACC,KAAK,CAAC,CAAC,yBAAyB,EAAET,YAAY;YAClDU,QAAQC,IAAI,CAAC;QACjB;QAEA,MAAMC,YAAYX,iBAAI,CAACY,OAAO,CAACV;QAC/B,IAAI,CAACG,eAAE,CAACC,UAAU,CAACK,YAAY;YAC3BN,eAAE,CAACQ,SAAS,CAACF,WAAW;gBAAEG,WAAW;YAAK;QAC9C;QAEAT,eAAE,CAACU,YAAY,CAAChB,YAAYG;QAE5B,MAAMc,OAAOC,KAAKC,KAAK,CAACb,eAAE,CAACc,YAAY,CAACjB,aAAa;QACrD,MAAMkB,YAAYC,OAAOC,IAAI,CAACN,MAAMO,MAAM;QAC1ChB,UAAG,CAACiB,IAAI,CAAC,CAAC,oBAAoB,EAAEJ,UAAU,SAAS,EAAElB,aAAa;IACtE;AACJ"}
@@ -1,5 +0,0 @@
1
- export declare const entry: {
2
- description: string;
3
- allowRunFromGlobal: true;
4
- };
5
- //# sourceMappingURL=coverage-finalize.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coverage-finalize.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/registry/coverage-finalize.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;CAGhB,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "entry", {
6
- enumerable: true,
7
- get: function() {
8
- return entry;
9
- }
10
- });
11
- const _defineentry = require("./define-entry");
12
- const entry = (0, _defineentry.defineEntry)({
13
- description: 'Write .nyc_output/out.json to coverage/coverage-final.json for CI collection',
14
- allowRunFromGlobal: true
15
- });
16
-
17
- //# sourceMappingURL=coverage-finalize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/cli/commands/registry/coverage-finalize.ts"],"sourcesContent":["import { defineEntry } from './define-entry';\n\nexport const entry = defineEntry({\n description: 'Write .nyc_output/out.json to coverage/coverage-final.json for CI collection',\n allowRunFromGlobal: true,\n});\n"],"names":["entry","defineEntry","description","allowRunFromGlobal"],"mappings":";;;;+BAEaA;;;eAAAA;;;6BAFe;AAErB,MAAMA,QAAQC,IAAAA,wBAAW,EAAC;IAC7BC,aAAa;IACbC,oBAAoB;AACxB"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Returns default exclusions applied to both test running and coverage
3
- * collection in Jest and Vitest.
4
- *
5
- * Patterns use regex syntax (for Jest testPathIgnorePatterns /
6
- * coveragePathIgnorePatterns) and double as substring matches in Vitest's
7
- * micromatch-based exclude / coverage.exclude.
8
- *
9
- * Destination folders (compiled output dirs from each package's tsconfig
10
- * outDir) are included so that dist/ files are excluded from tests and
11
- * coverage across all runners.
12
- */
13
- export declare function getDefaultExcludes(): string[];
14
- //# sourceMappingURL=default-excludes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"default-excludes.d.ts","sourceRoot":"","sources":["../../src/utils/default-excludes.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAS7C"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "getDefaultExcludes", {
6
- enumerable: true,
7
- get: function() {
8
- return getDefaultExcludes;
9
- }
10
- });
11
- const _getdestinationfolders = require("./get-destination-folders");
12
- function getDefaultExcludes() {
13
- return [
14
- '__mocks__',
15
- '\\.stories\\.',
16
- '\\.yalc',
17
- '\\.claude',
18
- '\\.d\\.ts',
19
- ...(0, _getdestinationfolders.getDestinationFolders)()
20
- ];
21
- }
22
-
23
- //# sourceMappingURL=default-excludes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/default-excludes.ts"],"sourcesContent":["import { getDestinationFolders } from './get-destination-folders';\n\n/**\n * Returns default exclusions applied to both test running and coverage\n * collection in Jest and Vitest.\n *\n * Patterns use regex syntax (for Jest testPathIgnorePatterns /\n * coveragePathIgnorePatterns) and double as substring matches in Vitest's\n * micromatch-based exclude / coverage.exclude.\n *\n * Destination folders (compiled output dirs from each package's tsconfig\n * outDir) are included so that dist/ files are excluded from tests and\n * coverage across all runners.\n */\nexport function getDefaultExcludes(): string[] {\n return [\n '__mocks__',\n '\\\\.stories\\\\.',\n '\\\\.yalc',\n '\\\\.claude',\n '\\\\.d\\\\.ts',\n ...getDestinationFolders(),\n ];\n}\n"],"names":["getDefaultExcludes","getDestinationFolders"],"mappings":";;;;+BAcgBA;;;eAAAA;;;uCAdsB;AAc/B,SAASA;IACZ,OAAO;QACH;QACA;QACA;QACA;QACA;WACGC,IAAAA,4CAAqB;KAC3B;AACL"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Returns a webpack `resolve.alias` map that redirects workspace package imports
3
- * to their TypeScript source directories when building with code coverage enabled.
4
- *
5
- * For each workspace package that declares a `main` entry point, this function:
6
- * 1. Reads `compilerOptions.rootDir` from the package's tsconfig
7
- * 2. Builds an alias from the package name to its resolved source root directory
8
- *
9
- * This ensures that the coverage-istanbul-loader instruments the original TypeScript
10
- * source files (rather than compiled `dist/*.js` output), so coverage data contains
11
- * correct `src/` file paths and TypeScript source positions — matching what jest and
12
- * vitest produce.
13
- *
14
- * Only packages with both a `main` field and a tsconfig `compilerOptions.rootDir`
15
- * are included. Packages without `main` (e.g. webpack bundle apps) are skipped
16
- * since they are not imported by other packages and need no alias.
17
- *
18
- * Example: for a package `@scope/common` at `packages/common` with
19
- * `tsconfig.json` containing `{ "compilerOptions": { "rootDir": "src" } }`,
20
- * the returned alias is `{ "@scope/common": "/abs/path/packages/common/src" }`.
21
- */
22
- export declare function getCoverageAliases(): Record<string, string>;
23
- //# sourceMappingURL=get-coverage-aliases.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-coverage-aliases.d.ts","sourceRoot":"","sources":["../../src/utils/get-coverage-aliases.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuB3D"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "getCoverageAliases", {
6
- enumerable: true,
7
- get: function() {
8
- return getCoverageAliases;
9
- }
10
- });
11
- const _nodefs = /*#__PURE__*/ _interop_require_default(require("node:fs"));
12
- const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
13
- const _findpackages = require("./find-packages");
14
- const _gettsconfig = require("./get-tsconfig");
15
- const _readjson = require("./read-json");
16
- function _interop_require_default(obj) {
17
- return obj && obj.__esModule ? obj : {
18
- default: obj
19
- };
20
- }
21
- function getCoverageAliases() {
22
- const packages = (0, _findpackages.findPackages)();
23
- const aliases = {};
24
- for (const pkg of packages){
25
- var _tsConfig_compilerOptions;
26
- // Only alias packages that are consumed as libraries (have a main entry point).
27
- // Apps / webpack bundles have no main and are never imported by other packages.
28
- if (!pkg.main) continue;
29
- const tsConfigPath = (0, _gettsconfig.getTsConfig)(pkg.location);
30
- if (!_nodefs.default.existsSync(tsConfigPath)) continue;
31
- const tsConfig = (0, _readjson.readJsonSafe)(tsConfigPath);
32
- const rootDir = tsConfig === null || tsConfig === void 0 ? void 0 : (_tsConfig_compilerOptions = tsConfig.compilerOptions) === null || _tsConfig_compilerOptions === void 0 ? void 0 : _tsConfig_compilerOptions.rootDir;
33
- if (!rootDir) continue;
34
- const srcDir = _nodepath.default.resolve(pkg.location, rootDir);
35
- if (!_nodefs.default.existsSync(srcDir)) continue;
36
- aliases[pkg.name] = srcDir;
37
- }
38
- return aliases;
39
- }
40
-
41
- //# sourceMappingURL=get-coverage-aliases.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/get-coverage-aliases.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { findPackages } from './find-packages';\nimport { getTsConfig } from './get-tsconfig';\nimport { readJsonSafe } from './read-json';\n\n/**\n * Returns a webpack `resolve.alias` map that redirects workspace package imports\n * to their TypeScript source directories when building with code coverage enabled.\n *\n * For each workspace package that declares a `main` entry point, this function:\n * 1. Reads `compilerOptions.rootDir` from the package's tsconfig\n * 2. Builds an alias from the package name to its resolved source root directory\n *\n * This ensures that the coverage-istanbul-loader instruments the original TypeScript\n * source files (rather than compiled `dist/*.js` output), so coverage data contains\n * correct `src/` file paths and TypeScript source positions — matching what jest and\n * vitest produce.\n *\n * Only packages with both a `main` field and a tsconfig `compilerOptions.rootDir`\n * are included. Packages without `main` (e.g. webpack bundle apps) are skipped\n * since they are not imported by other packages and need no alias.\n *\n * Example: for a package `@scope/common` at `packages/common` with\n * `tsconfig.json` containing `{ \"compilerOptions\": { \"rootDir\": \"src\" } }`,\n * the returned alias is `{ \"@scope/common\": \"/abs/path/packages/common/src\" }`.\n */\nexport function getCoverageAliases(): Record<string, string> {\n const packages = findPackages();\n const aliases: Record<string, string> = {};\n\n for (const pkg of packages) {\n // Only alias packages that are consumed as libraries (have a main entry point).\n // Apps / webpack bundles have no main and are never imported by other packages.\n if (!pkg.main) continue;\n\n const tsConfigPath = getTsConfig(pkg.location);\n if (!fs.existsSync(tsConfigPath)) continue;\n\n const tsConfig = readJsonSafe<{ compilerOptions?: { rootDir?: string } }>(tsConfigPath);\n const rootDir = tsConfig?.compilerOptions?.rootDir;\n if (!rootDir) continue;\n\n const srcDir = path.resolve(pkg.location, rootDir);\n if (!fs.existsSync(srcDir)) continue;\n\n aliases[pkg.name] = srcDir;\n }\n\n return aliases;\n}\n"],"names":["getCoverageAliases","packages","findPackages","aliases","pkg","tsConfig","main","tsConfigPath","getTsConfig","location","fs","existsSync","readJsonSafe","rootDir","compilerOptions","srcDir","path","resolve","name"],"mappings":";;;;+BA2BgBA;;;eAAAA;;;+DA3BD;iEACE;8BACY;6BACD;0BACC;;;;;;AAuBtB,SAASA;IACZ,MAAMC,WAAWC,IAAAA,0BAAY;IAC7B,MAAMC,UAAkC,CAAC;IAEzC,KAAK,MAAMC,OAAOH,SAAU;YASRI;QARhB,gFAAgF;QAChF,gFAAgF;QAChF,IAAI,CAACD,IAAIE,IAAI,EAAE;QAEf,MAAMC,eAAeC,IAAAA,wBAAW,EAACJ,IAAIK,QAAQ;QAC7C,IAAI,CAACC,eAAE,CAACC,UAAU,CAACJ,eAAe;QAElC,MAAMF,WAAWO,IAAAA,sBAAY,EAA6CL;QAC1E,MAAMM,UAAUR,qBAAAA,gCAAAA,4BAAAA,SAAUS,eAAe,cAAzBT,gDAAAA,0BAA2BQ,OAAO;QAClD,IAAI,CAACA,SAAS;QAEd,MAAME,SAASC,iBAAI,CAACC,OAAO,CAACb,IAAIK,QAAQ,EAAEI;QAC1C,IAAI,CAACH,eAAE,CAACC,UAAU,CAACI,SAAS;QAE5BZ,OAAO,CAACC,IAAIc,IAAI,CAAC,GAAGH;IACxB;IAEA,OAAOZ;AACX"}
@@ -1,21 +0,0 @@
1
- /**
2
- * Returns glob patterns scoped to each workspace package's source directory,
3
- * suitable for use as `collectCoverageFrom` (Jest) or `coverage.include` (Vitest).
4
- *
5
- * The source directory is read from `compilerOptions.rootDir` in each package's
6
- * tsconfig rather than assumed to be `src/`, since rootDir is configurable.
7
- * Falls back to `src` if no rootDir is found.
8
- *
9
- * Patterns are relative to `process.cwd()` (the project root). For a workspace
10
- * whose resolved location is `/root/packages/application` with rootDir `src`,
11
- * the returned pattern is `packages/application/src/**\/*.{ts,tsx}`.
12
- *
13
- * This avoids collecting coverage for unrelated files such as `.yalc/`,
14
- * `node_modules/`, config files in the repo root, `.storybook/`, etc.
15
- *
16
- * If no workspace packages are found (e.g. a single-package repo without a
17
- * workspaces config) the function falls back to `['**\/*.{ts,tsx}']` so that
18
- * coverage collection still works.
19
- */
20
- export declare function getCoverageSourcePatterns(): string[];
21
- //# sourceMappingURL=get-coverage-source-patterns.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-coverage-source-patterns.d.ts","sourceRoot":"","sources":["../../src/utils/get-coverage-source-patterns.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,EAAE,CAiBpD"}
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "getCoverageSourcePatterns", {
6
- enumerable: true,
7
- get: function() {
8
- return getCoverageSourcePatterns;
9
- }
10
- });
11
- const _nodefs = /*#__PURE__*/ _interop_require_default(require("node:fs"));
12
- const _path = /*#__PURE__*/ _interop_require_default(require("path"));
13
- const _findpackages = require("./find-packages");
14
- const _gettsconfig = require("./get-tsconfig");
15
- const _readjson = require("./read-json");
16
- function _interop_require_default(obj) {
17
- return obj && obj.__esModule ? obj : {
18
- default: obj
19
- };
20
- }
21
- function getCoverageSourcePatterns() {
22
- const packages = (0, _findpackages.findPackages)();
23
- if (packages.length === 0) {
24
- return [
25
- '**/*.{ts,tsx}'
26
- ];
27
- }
28
- return packages.map((pkg)=>{
29
- var _ref;
30
- var _tsConfig_compilerOptions;
31
- const tsConfigPath = (0, _gettsconfig.getTsConfig)(pkg.location);
32
- const tsConfig = _nodefs.default.existsSync(tsConfigPath) ? (0, _readjson.readJsonSafe)(tsConfigPath) : undefined;
33
- const rootDir = (_ref = tsConfig === null || tsConfig === void 0 ? void 0 : (_tsConfig_compilerOptions = tsConfig.compilerOptions) === null || _tsConfig_compilerOptions === void 0 ? void 0 : _tsConfig_compilerOptions.rootDir) !== null && _ref !== void 0 ? _ref : 'src';
34
- const rel = _path.default.relative(process.cwd(), pkg.location).replace(/\\/g, '/');
35
- return `${rel}/${rootDir}/**/*.{ts,tsx}`;
36
- });
37
- }
38
-
39
- //# sourceMappingURL=get-coverage-source-patterns.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/get-coverage-source-patterns.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'path';\nimport { findPackages } from './find-packages';\nimport { getTsConfig } from './get-tsconfig';\nimport { readJsonSafe } from './read-json';\n\n/**\n * Returns glob patterns scoped to each workspace package's source directory,\n * suitable for use as `collectCoverageFrom` (Jest) or `coverage.include` (Vitest).\n *\n * The source directory is read from `compilerOptions.rootDir` in each package's\n * tsconfig rather than assumed to be `src/`, since rootDir is configurable.\n * Falls back to `src` if no rootDir is found.\n *\n * Patterns are relative to `process.cwd()` (the project root). For a workspace\n * whose resolved location is `/root/packages/application` with rootDir `src`,\n * the returned pattern is `packages/application/src/**\\/*.{ts,tsx}`.\n *\n * This avoids collecting coverage for unrelated files such as `.yalc/`,\n * `node_modules/`, config files in the repo root, `.storybook/`, etc.\n *\n * If no workspace packages are found (e.g. a single-package repo without a\n * workspaces config) the function falls back to `['**\\/*.{ts,tsx}']` so that\n * coverage collection still works.\n */\nexport function getCoverageSourcePatterns(): string[] {\n const packages = findPackages();\n\n if (packages.length === 0) {\n return ['**/*.{ts,tsx}'];\n }\n\n return packages.map(pkg => {\n const tsConfigPath = getTsConfig(pkg.location);\n const tsConfig = fs.existsSync(tsConfigPath)\n ? readJsonSafe<{ compilerOptions?: { rootDir?: string } }>(tsConfigPath)\n : undefined;\n const rootDir = tsConfig?.compilerOptions?.rootDir ?? 'src';\n\n const rel = path.relative(process.cwd(), pkg.location).replace(/\\\\/g, '/');\n return `${rel}/${rootDir}/**/*.{ts,tsx}`;\n });\n}\n"],"names":["getCoverageSourcePatterns","packages","findPackages","length","map","pkg","tsConfig","tsConfigPath","getTsConfig","location","fs","existsSync","readJsonSafe","undefined","rootDir","compilerOptions","rel","path","relative","process","cwd","replace"],"mappings":";;;;+BAyBgBA;;;eAAAA;;;+DAzBD;6DACE;8BACY;6BACD;0BACC;;;;;;AAqBtB,SAASA;IACZ,MAAMC,WAAWC,IAAAA,0BAAY;IAE7B,IAAID,SAASE,MAAM,KAAK,GAAG;QACvB,OAAO;YAAC;SAAgB;IAC5B;IAEA,OAAOF,SAASG,GAAG,CAACC,CAAAA;;YAKAC;QAJhB,MAAMC,eAAeC,IAAAA,wBAAW,EAACH,IAAII,QAAQ;QAC7C,MAAMH,WAAWI,eAAE,CAACC,UAAU,CAACJ,gBACzBK,IAAAA,sBAAY,EAA6CL,gBACzDM;QACN,MAAMC,kBAAUR,qBAAAA,gCAAAA,4BAAAA,SAAUS,eAAe,cAAzBT,gDAAAA,0BAA2BQ,OAAO,uCAAI;QAEtD,MAAME,MAAMC,aAAI,CAACC,QAAQ,CAACC,QAAQC,GAAG,IAAIf,IAAII,QAAQ,EAAEY,OAAO,CAAC,OAAO;QACtE,OAAO,GAAGL,IAAI,CAAC,EAAEF,QAAQ,cAAc,CAAC;IAC5C;AACJ"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Returns default exclusions applied to both test running and coverage
3
- * collection in Jest and Vitest.
4
- *
5
- * Patterns use regex syntax (for Jest testPathIgnorePatterns /
6
- * coveragePathIgnorePatterns) and double as substring matches in Vitest's
7
- * micromatch-based exclude / coverage.exclude.
8
- *
9
- * Destination folders (compiled output dirs from each package's tsconfig
10
- * outDir) are included so that dist/ files are excluded from tests and
11
- * coverage across all runners.
12
- */
13
- export declare function getDefaultExcludes(): string[];
14
- //# sourceMappingURL=get-default-excludes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-default-excludes.d.ts","sourceRoot":"","sources":["../../src/utils/get-default-excludes.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "getDefaultExcludes", {
6
- enumerable: true,
7
- get: function() {
8
- return getDefaultExcludes;
9
- }
10
- });
11
- const _getdestinationfolders = require("./get-destination-folders");
12
- function getDefaultExcludes() {
13
- return [
14
- '__mocks__',
15
- '\\.stories\\.',
16
- '\\.yalc',
17
- '\\.d\\.ts',
18
- ...(0, _getdestinationfolders.getDestinationFolders)()
19
- ];
20
- }
21
-
22
- //# sourceMappingURL=get-default-excludes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/get-default-excludes.ts"],"sourcesContent":["import { getDestinationFolders } from './get-destination-folders';\n\n/**\n * Returns default exclusions applied to both test running and coverage\n * collection in Jest and Vitest.\n *\n * Patterns use regex syntax (for Jest testPathIgnorePatterns /\n * coveragePathIgnorePatterns) and double as substring matches in Vitest's\n * micromatch-based exclude / coverage.exclude.\n *\n * Destination folders (compiled output dirs from each package's tsconfig\n * outDir) are included so that dist/ files are excluded from tests and\n * coverage across all runners.\n */\nexport function getDefaultExcludes(): string[] {\n return ['__mocks__', '\\\\.stories\\\\.', '\\\\.yalc', '\\\\.d\\\\.ts', ...getDestinationFolders()];\n}\n"],"names":["getDefaultExcludes","getDestinationFolders"],"mappings":";;;;+BAcgBA;;;eAAAA;;;uCAdsB;AAc/B,SAASA;IACZ,OAAO;QAAC;QAAa;QAAiB;QAAW;WAAgBC,IAAAA,4CAAqB;KAAG;AAC7F"}
@@ -1,2 +0,0 @@
1
- export declare const JS_RULE_EXCLUDE: RegExp;
2
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/webpack/configs/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,QAA0B,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "JS_RULE_EXCLUDE", {
6
- enumerable: true,
7
- get: function() {
8
- return JS_RULE_EXCLUDE;
9
- }
10
- });
11
- const JS_RULE_EXCLUDE = /(node_modules|\.yalc)/;
12
-
13
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/webpack/configs/constants.ts"],"sourcesContent":["export const JS_RULE_EXCLUDE = /(node_modules|\\.yalc)/;\n"],"names":["JS_RULE_EXCLUDE"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,kBAAkB"}
@@ -1,22 +0,0 @@
1
- import type { RuleSetRule } from 'webpack';
2
- import { Context } from '../types';
3
- /**
4
- * Webpack rules for TypeScript source files when building with code coverage.
5
- *
6
- * Normally the main webpack build only processes pre-compiled `.js` files
7
- * (TypeScript is compiled to JS before webpack runs). When code coverage is
8
- * enabled, workspace package imports are aliased from their `dist/` output to
9
- * their `src/` TypeScript source (via `resolve.alias` in `resolve-config.ts`),
10
- * so webpack now encounters raw `.ts`/`.tsx` files that need a compiler.
11
- *
12
- * Processing order for `.ts`/`.tsx` files:
13
- * 1. `coverage-istanbul-loader` (`enforce: 'pre'`) — instruments the original
14
- * TypeScript source, recording fnMap/statementMap positions from the TS AST.
15
- * `parserPlugins: ['typescript', 'jsx']` lets babel parse TypeScript syntax.
16
- * 2. `swc-loader` (normal) — compiles the instrumented TypeScript to JavaScript.
17
- *
18
- * This mirrors the cypress component test webpack config, ensuring e2e coverage
19
- * uses the same instrumentation strategy and produces matching source positions.
20
- */
21
- export declare function tsCoverageRules({ codeCoverage }: Context): RuleSetRule[];
22
- //# sourceMappingURL=ts-coverage-rules.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ts-coverage-rules.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/rules/ts-coverage-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,EAAE,YAAY,EAAE,EAAE,OAAO,GAAG,WAAW,EAAE,CA+BxE"}
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "tsCoverageRules", {
6
- enumerable: true,
7
- get: function() {
8
- return tsCoverageRules;
9
- }
10
- });
11
- const _tasks = require("../../../cli/tasks");
12
- const _utils = require("../../../cli/utils");
13
- const _utils1 = require("../../../utils");
14
- function tsCoverageRules({ codeCoverage }) {
15
- if (!codeCoverage) {
16
- return [];
17
- }
18
- const tsConfig = new _utils.TSConfig((0, _utils1.getTsConfigWithFallback)());
19
- const swcOptions = (0, _tasks.getSwcOptions)(tsConfig);
20
- return [
21
- {
22
- test: /\.tsx?$/,
23
- exclude: /(node_modules|\.yalc)/,
24
- use: {
25
- loader: 'swc-loader',
26
- options: swcOptions
27
- }
28
- },
29
- {
30
- enforce: 'pre',
31
- test: /\.tsx?$/,
32
- exclude: /(node_modules|\.yalc)/,
33
- use: {
34
- loader: '@jsdevtools/coverage-istanbul-loader',
35
- options: {
36
- compact: false,
37
- produceSourceMap: true,
38
- parserPlugins: [
39
- 'typescript',
40
- 'jsx'
41
- ]
42
- }
43
- }
44
- }
45
- ];
46
- }
47
-
48
- //# sourceMappingURL=ts-coverage-rules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/webpack/configs/rules/ts-coverage-rules.ts"],"sourcesContent":["import type { RuleSetRule } from 'webpack';\nimport { getSwcOptions } from '../../../cli/tasks';\nimport { TSConfig } from '../../../cli/utils';\nimport { getTsConfigWithFallback } from '../../../utils';\nimport { Context } from '../types';\n\n/**\n * Webpack rules for TypeScript source files when building with code coverage.\n *\n * Normally the main webpack build only processes pre-compiled `.js` files\n * (TypeScript is compiled to JS before webpack runs). When code coverage is\n * enabled, workspace package imports are aliased from their `dist/` output to\n * their `src/` TypeScript source (via `resolve.alias` in `resolve-config.ts`),\n * so webpack now encounters raw `.ts`/`.tsx` files that need a compiler.\n *\n * Processing order for `.ts`/`.tsx` files:\n * 1. `coverage-istanbul-loader` (`enforce: 'pre'`) — instruments the original\n * TypeScript source, recording fnMap/statementMap positions from the TS AST.\n * `parserPlugins: ['typescript', 'jsx']` lets babel parse TypeScript syntax.\n * 2. `swc-loader` (normal) — compiles the instrumented TypeScript to JavaScript.\n *\n * This mirrors the cypress component test webpack config, ensuring e2e coverage\n * uses the same instrumentation strategy and produces matching source positions.\n */\nexport function tsCoverageRules({ codeCoverage }: Context): RuleSetRule[] {\n if (!codeCoverage) {\n return [];\n }\n\n const tsConfig = new TSConfig(getTsConfigWithFallback());\n const swcOptions = getSwcOptions(tsConfig);\n\n return [\n {\n test: /\\.tsx?$/,\n exclude: /(node_modules|\\.yalc)/,\n use: {\n loader: 'swc-loader',\n options: swcOptions,\n },\n },\n {\n enforce: 'pre',\n test: /\\.tsx?$/,\n exclude: /(node_modules|\\.yalc)/,\n use: {\n loader: '@jsdevtools/coverage-istanbul-loader',\n options: {\n compact: false,\n produceSourceMap: true,\n parserPlugins: ['typescript', 'jsx'],\n },\n },\n },\n ];\n}\n"],"names":["tsCoverageRules","codeCoverage","tsConfig","TSConfig","getTsConfigWithFallback","swcOptions","getSwcOptions","test","exclude","use","loader","options","enforce","compact","produceSourceMap","parserPlugins"],"mappings":";;;;+BAwBgBA;;;eAAAA;;;uBAvBc;uBACL;wBACe;AAqBjC,SAASA,gBAAgB,EAAEC,YAAY,EAAW;IACrD,IAAI,CAACA,cAAc;QACf,OAAO,EAAE;IACb;IAEA,MAAMC,WAAW,IAAIC,eAAQ,CAACC,IAAAA,+BAAuB;IACrD,MAAMC,aAAaC,IAAAA,oBAAa,EAACJ;IAEjC,OAAO;QACH;YACIK,MAAM;YACNC,SAAS;YACTC,KAAK;gBACDC,QAAQ;gBACRC,SAASN;YACb;QACJ;QACA;YACIO,SAAS;YACTL,MAAM;YACNC,SAAS;YACTC,KAAK;gBACDC,QAAQ;gBACRC,SAAS;oBACLE,SAAS;oBACTC,kBAAkB;oBAClBC,eAAe;wBAAC;wBAAc;qBAAM;gBACxC;YACJ;QACJ;KACH;AACL"}