@servicetitan/startup 22.18.0 → 22.20.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/dist/cli/commands/build.d.ts +1 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +1 -0
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts +5 -3
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js +7 -2
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts +1 -0
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +3 -2
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/start.d.ts +5 -4
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +3 -0
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/utils/bundle.d.ts +2 -0
- package/dist/cli/utils/bundle.d.ts.map +1 -1
- package/dist/cli/utils/bundle.js +14 -7
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts +1 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.js +2 -2
- package/dist/webpack/configs/plugins/provide-react-plugin.js.map +1 -1
- package/dist/webpack/configs/rules/tsx-rules.d.ts +1 -1
- package/dist/webpack/configs/rules/tsx-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/tsx-rules.js +27 -7
- package/dist/webpack/configs/rules/tsx-rules.js.map +1 -1
- package/dist/webpack/configs/types.d.ts +1 -0
- package/dist/webpack/configs/types.d.ts.map +1 -1
- package/dist/webpack/create-webpack-config.d.ts.map +1 -1
- package/dist/webpack/create-webpack-config.js +2 -1
- package/dist/webpack/create-webpack-config.js.map +1 -1
- package/dist/webpack/types.d.ts +2 -0
- package/dist/webpack/types.d.ts.map +1 -1
- package/package.json +7 -5
- package/src/cli/commands/__tests__/build.test.ts +14 -0
- package/src/cli/commands/__tests__/bundle-package.test.ts +8 -4
- package/src/cli/commands/__tests__/init.test.ts +5 -4
- package/src/cli/commands/__tests__/mfe-package-clean.test.ts +4 -3
- package/src/cli/commands/__tests__/mfe-package-publish.test.ts +15 -4
- package/src/cli/commands/__tests__/mfe-publish.test.ts +5 -3
- package/src/cli/commands/__tests__/start.test.ts +14 -0
- package/src/cli/commands/__tests__/styles-check.test.ts +12 -11
- package/src/cli/commands/build.ts +2 -0
- package/src/cli/commands/bundle-package.ts +13 -5
- package/src/cli/commands/mfe-publish.ts +3 -1
- package/src/cli/commands/start.ts +8 -4
- package/src/cli/utils/__tests__/bundle.test.ts +15 -14
- package/src/cli/utils/__tests__/eslint.test.ts +11 -4
- package/src/cli/utils/__tests__/get-module-type.test.ts +10 -15
- package/src/cli/utils/__tests__/is-module-installed.test.ts +6 -7
- package/src/cli/utils/__tests__/tcm.test.ts +6 -5
- package/src/cli/utils/__tests__/tsc.test.ts +6 -7
- package/src/cli/utils/bundle.ts +25 -7
- package/src/utils/__tests__/get-configuration.test.ts +20 -14
- package/src/utils/__tests__/get-destination-folders.test.ts +11 -13
- package/src/utils/__tests__/get-folders.test.ts +8 -6
- package/src/utils/__tests__/get-tsconfig.test.ts +6 -4
- package/src/utils/__tests__/read-json.test.ts +12 -16
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +6 -5
- package/src/webpack/__tests__/create-webpack-config.test.ts +48 -9
- package/src/webpack/configs/plugins/provide-react-plugin.ts +2 -2
- package/src/webpack/configs/rules/tsx-rules.ts +32 -10
- package/src/webpack/configs/types.ts +1 -0
- package/src/webpack/configs/utils/__tests__/generate-metadata.test.ts +9 -12
- package/src/webpack/configs/utils/__tests__/get-startup-version.test.ts +6 -10
- package/src/webpack/create-webpack-config.ts +3 -1
- package/src/webpack/types.ts +2 -0
- package/template/.gitignore +4 -0
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { fs, vol } from 'memfs';
|
|
2
2
|
|
|
3
3
|
import { getStartupVersion } from '../get-startup-version';
|
|
4
4
|
|
|
5
|
+
jest.mock('fs', () => fs);
|
|
6
|
+
|
|
5
7
|
describe(`[startup] ${getStartupVersion.name}`, () => {
|
|
6
8
|
const startupVersion = '1.2.3';
|
|
7
9
|
|
|
8
10
|
beforeEach(() => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
node_modules: {
|
|
12
|
-
'@servicetitan': {
|
|
13
|
-
'package.json': JSON.stringify({ version: startupVersion }),
|
|
14
|
-
'startup': { 'index.js': '' },
|
|
15
|
-
},
|
|
16
|
-
},
|
|
11
|
+
vol.fromJSON({
|
|
12
|
+
'packages/startup/package.json': JSON.stringify({ version: startupVersion }),
|
|
17
13
|
});
|
|
18
14
|
});
|
|
19
15
|
|
|
20
|
-
afterEach(() =>
|
|
16
|
+
afterEach(() => vol.reset());
|
|
21
17
|
|
|
22
18
|
const subject = () => getStartupVersion();
|
|
23
19
|
|
|
@@ -41,7 +41,9 @@ export function createWebpackConfig(overrides: Overrides, options: Options = {})
|
|
|
41
41
|
|
|
42
42
|
const context: Context = {
|
|
43
43
|
destination,
|
|
44
|
-
esbuild: !!(argv as Arguments).esbuild,
|
|
44
|
+
esbuild: options.esbuild ?? !!(argv as Arguments).esbuild ?? false,
|
|
45
|
+
experimentalBundlers:
|
|
46
|
+
options.experimentalBundlers ?? !!(argv as Arguments)['experimental-bundlers'] ?? false,
|
|
45
47
|
isCustomStyleRules: isCustomStyleRules(),
|
|
46
48
|
isExposeSharedDependencies: isExposeSharedDependencies(),
|
|
47
49
|
isProduction: configuration.mode === 'production',
|
package/src/webpack/types.ts
CHANGED