@servicetitan/startup 36.1.0 → 36.1.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cypress/config/webpack-config.ts"],"sourcesContent":["import { inspect } from 'node:util';\nimport type { Configuration } from 'webpack';\nimport merge from 'webpack-merge';\nimport { getSwcOptions } from '../../cli/tasks';\nimport { TSConfig } from '../../cli/utils';\nimport { getTsConfigWithFallback, log } from '../../utils';\nimport { Context, Overrides, rulesConfig } from '../../webpack/configs';\n\nexport function webpackConfig(overrides?: Overrides): Configuration {\n const context = getContext();\n const rules = getRules(context, overrides ?? {});\n\n /* istanbul ignore next: debug only */\n log.debug('cypress-config:webpack-config', () => inspect({ rules }, { depth: null }));\n\n const config: Configuration = {\n module: {\n rules,\n },\n resolve: {\n extensions: ['.ts', '.tsx', '.js', '.jsx'],\n },\n };\n\n return merge(config, overrides?.configuration ?? {});\n}\n\nfunction getContext(): Context {\n return {\n destination: '',\n isProduction: false,\n name: '',\n packageData: {} as any,\n sharedDependencies: {},\n source: '',\n };\n}\n\nfunction getRules(context: Context, overrides: Overrides) {\n const { rules } = rulesConfig(context, overrides);\n\n return [getSwcLoaderRule(), ...rules];\n}\n\nfunction getSwcLoaderRule() {\n const tsConfig = new TSConfig(getTsConfigWithFallback());\n\n const swcOptions = getSwcOptions(tsConfig);\n\n return {\n test: /\\.tsx?$/,\n exclude: /node_modules/,\n use: {\n loader: 'swc-loader',\n options: swcOptions,\n },\n };\n}\n"],"names":["webpackConfig","overrides","context","getContext","rules","getRules","log","debug","inspect","depth","config","module","resolve","extensions","merge","configuration","destination","isProduction","name","packageData","sharedDependencies","source","rulesConfig","getSwcLoaderRule","tsConfig","TSConfig","getTsConfigWithFallback","swcOptions","getSwcOptions","test","exclude","use","loader","options"],"mappings":";;;;+BAQgBA;;;eAAAA;;;0BARQ;qEAEN;uBACY;uBACL;wBACoB;yBACG;;;;;;AAEzC,SAASA,cAAcC,SAAqB;;IAC/C,MAAMC,UAAUC;IAChB,MAAMC,QAAQC,SAASH,SAASD,sBAAAA,uBAAAA,YAAa,CAAC;IAE9C,oCAAoC,GACpCK,WAAG,CAACC,KAAK,CAAC,iCAAiC,IAAMC,IAAAA,iBAAO,EAAC;YAAEJ;QAAM,GAAG;YAAEK,OAAO;QAAK;IAElF,MAAMC,SAAwB;QAC1BC,QAAQ;YACJP;QACJ;QACAQ,SAAS;YACLC,YAAY;gBAAC;gBAAO;gBAAQ;gBAAO;aAAO;QAC9C;IACJ;IAEA,OAAOC,IAAAA,qBAAK,EAACJ,gBAAQT,sBAAAA,gCAAAA,UAAWc,aAAa,uCAAI,CAAC;AACtD;AAEA,SAASZ;IACL,OAAO;QACHa,aAAa;QACbC,cAAc;QACdC,MAAM;QACNC,aAAa,CAAC;QACdC,oBAAoB,CAAC;QACrBC,QAAQ;IACZ;AACJ;AAEA,
|
|
1
|
+
{"version":3,"sources":["../../../src/cypress/config/webpack-config.ts"],"sourcesContent":["import { inspect } from 'node:util';\nimport type { Configuration } from 'webpack';\nimport merge from 'webpack-merge';\nimport { getSwcOptions } from '../../cli/tasks';\nimport { TSConfig } from '../../cli/utils';\nimport { getTsConfigWithFallback, log } from '../../utils';\nimport { Context, Overrides, rulesConfig } from '../../webpack/configs';\n\nexport function webpackConfig(overrides?: Overrides): Configuration {\n const context = getContext();\n const rules = getRules(context, overrides ?? {});\n\n /* istanbul ignore next: debug only */\n log.debug('cypress-config:webpack-config', () => inspect({ rules }, { depth: null }));\n\n const config: Configuration = {\n module: {\n rules,\n },\n resolve: {\n extensions: ['.ts', '.tsx', '.js', '.jsx'],\n },\n };\n\n return merge(config, overrides?.configuration ?? {});\n}\n\nfunction getContext(): Context {\n return {\n codeCoverage: true,\n destination: '',\n isProduction: false,\n name: '',\n packageData: {} as any,\n sharedDependencies: {},\n source: '',\n };\n}\n\nfunction getRules(context: Context, overrides: Overrides) {\n const { rules } = rulesConfig(context, overrides);\n\n return [getSwcLoaderRule(), ...rules];\n}\n\nfunction getSwcLoaderRule() {\n const tsConfig = new TSConfig(getTsConfigWithFallback());\n\n const swcOptions = getSwcOptions(tsConfig);\n\n return {\n test: /\\.tsx?$/,\n exclude: /node_modules/,\n use: {\n loader: 'swc-loader',\n options: swcOptions,\n },\n };\n}\n"],"names":["webpackConfig","overrides","context","getContext","rules","getRules","log","debug","inspect","depth","config","module","resolve","extensions","merge","configuration","codeCoverage","destination","isProduction","name","packageData","sharedDependencies","source","rulesConfig","getSwcLoaderRule","tsConfig","TSConfig","getTsConfigWithFallback","swcOptions","getSwcOptions","test","exclude","use","loader","options"],"mappings":";;;;+BAQgBA;;;eAAAA;;;0BARQ;qEAEN;uBACY;uBACL;wBACoB;yBACG;;;;;;AAEzC,SAASA,cAAcC,SAAqB;;IAC/C,MAAMC,UAAUC;IAChB,MAAMC,QAAQC,SAASH,SAASD,sBAAAA,uBAAAA,YAAa,CAAC;IAE9C,oCAAoC,GACpCK,WAAG,CAACC,KAAK,CAAC,iCAAiC,IAAMC,IAAAA,iBAAO,EAAC;YAAEJ;QAAM,GAAG;YAAEK,OAAO;QAAK;IAElF,MAAMC,SAAwB;QAC1BC,QAAQ;YACJP;QACJ;QACAQ,SAAS;YACLC,YAAY;gBAAC;gBAAO;gBAAQ;gBAAO;aAAO;QAC9C;IACJ;IAEA,OAAOC,IAAAA,qBAAK,EAACJ,gBAAQT,sBAAAA,gCAAAA,UAAWc,aAAa,uCAAI,CAAC;AACtD;AAEA,SAASZ;IACL,OAAO;QACHa,cAAc;QACdC,aAAa;QACbC,cAAc;QACdC,MAAM;QACNC,aAAa,CAAC;QACdC,oBAAoB,CAAC;QACrBC,QAAQ;IACZ;AACJ;AAEA,SAASjB,SAASH,OAAgB,EAAED,SAAoB;IACpD,MAAM,EAAEG,KAAK,EAAE,GAAGmB,IAAAA,oBAAW,EAACrB,SAASD;IAEvC,OAAO;QAACuB;WAAuBpB;KAAM;AACzC;AAEA,SAASoB;IACL,MAAMC,WAAW,IAAIC,eAAQ,CAACC,IAAAA,+BAAuB;IAErD,MAAMC,aAAaC,IAAAA,oBAAa,EAACJ;IAEjC,OAAO;QACHK,MAAM;QACNC,SAAS;QACTC,KAAK;YACDC,QAAQ;YACRC,SAASN;QACb;IACJ;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/startup",
|
|
3
|
-
"version": "36.1.
|
|
3
|
+
"version": "36.1.1",
|
|
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": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"typings": "./dist/index.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
22
|
},
|
|
23
23
|
"./@types/cypress": {
|
|
24
24
|
"types": "./dist/cypress/types/index.d.ts"
|
|
@@ -60,16 +60,16 @@
|
|
|
60
60
|
"@jest/core": "~30.3.0",
|
|
61
61
|
"@jest/types": "~30.3.0",
|
|
62
62
|
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
|
|
63
|
-
"@servicetitan/eslint-config": "36.1.
|
|
64
|
-
"@servicetitan/install": "36.1.
|
|
65
|
-
"@servicetitan/startup-utils": "36.1.
|
|
66
|
-
"@servicetitan/stylelint-config": "36.1.
|
|
63
|
+
"@servicetitan/eslint-config": "36.1.1",
|
|
64
|
+
"@servicetitan/install": "36.1.1",
|
|
65
|
+
"@servicetitan/startup-utils": "36.1.1",
|
|
66
|
+
"@servicetitan/stylelint-config": "36.1.1",
|
|
67
67
|
"@svgr/webpack": "^8.1.0",
|
|
68
68
|
"@swc/cli": "^0.8.1",
|
|
69
69
|
"@swc/core": "1.15.24",
|
|
70
70
|
"@types/debug": "^4.1.12",
|
|
71
71
|
"@types/jest": "~30.0.0",
|
|
72
|
-
"@vitest/coverage-v8": "^4.1.
|
|
72
|
+
"@vitest/coverage-v8": "^4.1.4",
|
|
73
73
|
"chalk": "~4.1.2",
|
|
74
74
|
"cli-table3": "^0.6.5",
|
|
75
75
|
"cpx2": "8.0.2",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"ts-node": "~10.9.2",
|
|
116
116
|
"typed-css-modules": "~0.9.1",
|
|
117
117
|
"typescript": "5.9.3",
|
|
118
|
-
"vitest": "^4.1.
|
|
118
|
+
"vitest": "^4.1.4",
|
|
119
119
|
"webpack": "~5.105.4",
|
|
120
120
|
"webpack-assets-manifest": "~6.5.1",
|
|
121
121
|
"webpack-bundle-analyzer": "^5.3.0",
|
|
@@ -147,5 +147,5 @@
|
|
|
147
147
|
"cli": {
|
|
148
148
|
"webpack": false
|
|
149
149
|
},
|
|
150
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "613ecdc5bb02a009292843c9674bcd18f408bcfa"
|
|
151
151
|
}
|
|
@@ -45,6 +45,15 @@ describe(`[startup/cypress-config] ${webpackConfig.name}`, () => {
|
|
|
45
45
|
);
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
+
test('enables code coverage', () => {
|
|
49
|
+
subject();
|
|
50
|
+
|
|
51
|
+
expect(rulesConfig).toHaveBeenCalledWith(
|
|
52
|
+
expect.objectContaining({ codeCoverage: true }),
|
|
53
|
+
expect.anything()
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
|
|
48
57
|
test('includes all rules from rulesConfig', () => {
|
|
49
58
|
const result = subject();
|
|
50
59
|
|