@servicetitan/startup 30.3.0 → 31.0.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/bin/index.js +5 -6
- package/dist/cli/commands/build.d.ts +10 -3
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +124 -48
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts +0 -2
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js +54 -36
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/clean.d.ts +6 -0
- package/dist/cli/commands/clean.d.ts.map +1 -0
- package/dist/cli/commands/clean.js +55 -0
- package/dist/cli/commands/clean.js.map +1 -0
- package/dist/cli/commands/convert-eslint-config.js +163 -107
- package/dist/cli/commands/convert-eslint-config.js.map +1 -1
- package/dist/cli/commands/eslint.d.ts.map +1 -1
- package/dist/cli/commands/eslint.js +43 -24
- package/dist/cli/commands/eslint.js.map +1 -1
- package/dist/cli/commands/get-command.d.ts.map +1 -1
- package/dist/cli/commands/get-command.js +50 -53
- package/dist/cli/commands/get-command.js.map +1 -1
- package/dist/cli/commands/get-user-commands.js +21 -11
- package/dist/cli/commands/get-user-commands.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +31 -30
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.js +74 -48
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +8 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +61 -23
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/kendo-ui-license.js +48 -31
- package/dist/cli/commands/kendo-ui-license.js.map +1 -1
- package/dist/cli/commands/lint.d.ts +3 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +112 -73
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mfe-package-clean.js +80 -57
- package/dist/cli/commands/mfe-package-clean.js.map +1 -1
- package/dist/cli/commands/mfe-package-publish.d.ts +1 -0
- package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-publish.js +124 -70
- package/dist/cli/commands/mfe-package-publish.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +83 -48
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/prepare-package.d.ts +3 -2
- package/dist/cli/commands/prepare-package.d.ts.map +1 -1
- package/dist/cli/commands/prepare-package.js +44 -32
- package/dist/cli/commands/prepare-package.js.map +1 -1
- package/dist/cli/commands/review/__mocks__/expect-calls.d.ts +23 -0
- package/dist/cli/commands/review/__mocks__/expect-calls.d.ts.map +1 -0
- package/dist/cli/commands/review/__mocks__/index.d.ts +2 -0
- package/dist/cli/commands/review/__mocks__/index.d.ts.map +1 -0
- package/dist/cli/commands/review/index.d.ts +3 -0
- package/dist/cli/commands/review/index.d.ts.map +1 -0
- package/dist/cli/commands/review/index.js +20 -0
- package/dist/cli/commands/review/index.js.map +1 -0
- package/dist/cli/commands/review/review.d.ts +28 -0
- package/dist/cli/commands/review/review.d.ts.map +1 -0
- package/dist/cli/commands/review/review.js +239 -0
- package/dist/cli/commands/review/review.js.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/index.d.ts +4 -0
- package/dist/cli/commands/review/rules/__mocks__/index.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts +7 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts +21 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts +3 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/index.d.ts +3 -0
- package/dist/cli/commands/review/rules/index.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/index.js +30 -0
- package/dist/cli/commands/review/rules/index.js.map +1 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts +14 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.js +89 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.js.map +1 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.js +37 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.js.map +1 -0
- package/dist/cli/commands/review/rules/require-npmrc.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-npmrc.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-npmrc.js +38 -0
- package/dist/cli/commands/review/rules/require-npmrc.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts +5 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js +33 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.d.ts +45 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.js +140 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-package-version.d.ts +20 -0
- package/dist/cli/commands/review/rules/require-one-package-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-package-version.js +70 -0
- package/dist/cli/commands/review/rules/require-one-package-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts +5 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.js +40 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts +19 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js +103 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js.map +1 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.js +37 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.js.map +1 -0
- package/dist/cli/commands/review/types.d.ts +72 -0
- package/dist/cli/commands/review/types.d.ts.map +1 -0
- package/dist/cli/commands/review/types.js +36 -0
- package/dist/cli/commands/review/types.js.map +1 -0
- package/dist/cli/commands/review/utils/apply-filter.d.ts +3 -0
- package/dist/cli/commands/review/utils/apply-filter.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/apply-filter.js +20 -0
- package/dist/cli/commands/review/utils/apply-filter.js.map +1 -0
- package/dist/cli/commands/review/utils/collate-dependencies.d.ts +29 -0
- package/dist/cli/commands/review/utils/collate-dependencies.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/collate-dependencies.js +31 -0
- package/dist/cli/commands/review/utils/collate-dependencies.js.map +1 -0
- package/dist/cli/commands/review/utils/compare-version.d.ts +9 -0
- package/dist/cli/commands/review/utils/compare-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/compare-version.js +137 -0
- package/dist/cli/commands/review/utils/compare-version.js.map +1 -0
- package/dist/cli/commands/review/utils/format-depends-on.d.ts +2 -0
- package/dist/cli/commands/review/utils/format-depends-on.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/format-depends-on.js +21 -0
- package/dist/cli/commands/review/utils/format-depends-on.js.map +1 -0
- package/dist/cli/commands/review/utils/format-location.d.ts +2 -0
- package/dist/cli/commands/review/utils/format-location.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/format-location.js +25 -0
- package/dist/cli/commands/review/utils/format-location.js.map +1 -0
- package/dist/cli/commands/review/utils/get-key.d.ts +3 -0
- package/dist/cli/commands/review/utils/get-key.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/get-key.js +20 -0
- package/dist/cli/commands/review/utils/get-key.js.map +1 -0
- package/dist/cli/commands/review/utils/get-max-version.d.ts +2 -0
- package/dist/cli/commands/review/utils/get-max-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/get-max-version.js +16 -0
- package/dist/cli/commands/review/utils/get-max-version.js.map +1 -0
- package/dist/cli/commands/review/utils/indent.d.ts +2 -0
- package/dist/cli/commands/review/utils/indent.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/indent.js +17 -0
- package/dist/cli/commands/review/utils/indent.js.map +1 -0
- package/dist/cli/commands/review/utils/index.d.ts +14 -0
- package/dist/cli/commands/review/utils/index.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/index.js +32 -0
- package/dist/cli/commands/review/utils/index.js.map +1 -0
- package/dist/cli/commands/review/utils/is-library.d.ts +3 -0
- package/dist/cli/commands/review/utils/is-library.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/is-library.js +15 -0
- package/dist/cli/commands/review/utils/is-library.js.map +1 -0
- package/dist/cli/commands/review/utils/name-to-location.d.ts +3 -0
- package/dist/cli/commands/review/utils/name-to-location.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/name-to-location.js +18 -0
- package/dist/cli/commands/review/utils/name-to-location.js.map +1 -0
- package/dist/cli/commands/review/utils/pluralize.d.ts +2 -0
- package/dist/cli/commands/review/utils/pluralize.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/pluralize.js +15 -0
- package/dist/cli/commands/review/utils/pluralize.js.map +1 -0
- package/dist/cli/commands/review/utils/set-version.d.ts +10 -0
- package/dist/cli/commands/review/utils/set-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/set-version.js +33 -0
- package/dist/cli/commands/review/utils/set-version.js.map +1 -0
- package/dist/cli/commands/review/utils/summarize.d.ts +11 -0
- package/dist/cli/commands/review/utils/summarize.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/summarize.js +30 -0
- package/dist/cli/commands/review/utils/summarize.js.map +1 -0
- package/dist/cli/commands/run-task.js +50 -31
- package/dist/cli/commands/run-task.js.map +1 -1
- package/dist/cli/commands/run-task.test.d.ts +2 -0
- package/dist/cli/commands/run-task.test.d.ts.map +1 -0
- package/dist/cli/commands/start.d.ts +11 -3
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +166 -69
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/styles-check.js +73 -59
- package/dist/cli/commands/styles-check.js.map +1 -1
- package/dist/cli/commands/tests.d.ts +1 -0
- package/dist/cli/commands/tests.d.ts.map +1 -1
- package/dist/cli/commands/tests.js +45 -28
- package/dist/cli/commands/tests.js.map +1 -1
- package/dist/cli/commands/types.d.ts +1 -0
- package/dist/cli/commands/types.d.ts.map +1 -1
- package/dist/cli/commands/types.js +4 -1
- package/dist/cli/commands/types.js.map +1 -1
- package/dist/cli/index.js +43 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tasks/cli-task.d.ts +0 -1
- package/dist/cli/tasks/cli-task.d.ts.map +1 -1
- package/dist/cli/tasks/cli-task.js +52 -41
- package/dist/cli/tasks/cli-task.js.map +1 -1
- package/dist/cli/tasks/swc-compile-package.d.ts +0 -1
- package/dist/cli/tasks/swc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/swc-compile-package.js +75 -34
- package/dist/cli/tasks/swc-compile-package.js.map +1 -1
- package/dist/cli/tasks/task.d.ts +0 -2
- package/dist/cli/tasks/task.d.ts.map +1 -1
- package/dist/cli/tasks/task.js +60 -65
- package/dist/cli/tasks/task.js.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.d.ts +0 -1
- package/dist/cli/tasks/tsc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.js +26 -22
- package/dist/cli/tasks/tsc-compile-package.js.map +1 -1
- package/dist/cli/tasks/tsc-compile.d.ts +0 -2
- package/dist/cli/tasks/tsc-compile.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile.js +51 -31
- package/dist/cli/tasks/tsc-compile.js.map +1 -1
- package/dist/cli/utils/bundle.d.ts +0 -2
- package/dist/cli/utils/bundle.d.ts.map +1 -1
- package/dist/cli/utils/bundle.js +118 -70
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/cli/utils/check-args.d.ts +6 -0
- package/dist/cli/utils/check-args.d.ts.map +1 -0
- package/dist/cli/utils/check-args.js +20 -0
- package/dist/cli/utils/check-args.js.map +1 -0
- package/dist/cli/utils/cli-git.js +23 -9
- package/dist/cli/utils/cli-git.js.map +1 -1
- package/dist/cli/utils/cli-npm.js +62 -23
- package/dist/cli/utils/cli-npm.js.map +1 -1
- package/dist/cli/utils/cli-os.js +34 -33
- package/dist/cli/utils/cli-os.js.map +1 -1
- package/dist/cli/utils/compile-less.d.ts.map +1 -1
- package/dist/cli/utils/compile-less.js +27 -11
- package/dist/cli/utils/compile-less.js.map +1 -1
- package/dist/cli/utils/compile-sass.d.ts.map +1 -1
- package/dist/cli/utils/compile-sass.js +25 -9
- package/dist/cli/utils/compile-sass.js.map +1 -1
- package/dist/cli/utils/compile.d.ts +6 -0
- package/dist/cli/utils/compile.d.ts.map +1 -0
- package/dist/cli/utils/compile.js +33 -0
- package/dist/cli/utils/compile.js.map +1 -0
- package/dist/cli/utils/copy-files.d.ts +8 -0
- package/dist/cli/utils/copy-files.d.ts.map +1 -0
- package/dist/cli/utils/copy-files.js +112 -0
- package/dist/cli/utils/copy-files.js.map +1 -0
- package/dist/cli/utils/eslint.d.ts.map +1 -1
- package/dist/cli/utils/eslint.js +22 -12
- package/dist/cli/utils/eslint.js.map +1 -1
- package/dist/cli/utils/get-module-type.d.ts.map +1 -1
- package/dist/cli/utils/get-module-type.js +21 -13
- package/dist/cli/utils/get-module-type.js.map +1 -1
- package/dist/cli/utils/index.d.ts +7 -5
- package/dist/cli/utils/index.d.ts.map +1 -1
- package/dist/cli/utils/index.js +33 -30
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/cli/utils/is-module-installed.js +11 -4
- package/dist/cli/utils/is-module-installed.js.map +1 -1
- package/dist/cli/utils/lerna-exec.d.ts +4 -3
- package/dist/cli/utils/lerna-exec.d.ts.map +1 -1
- package/dist/cli/utils/lerna-exec.js +40 -19
- package/dist/cli/utils/lerna-exec.js.map +1 -1
- package/dist/cli/utils/maybe-create-git-folder.js +20 -18
- package/dist/cli/utils/maybe-create-git-folder.js.map +1 -1
- package/dist/cli/utils/pipe-stdout.d.ts +3 -0
- package/dist/cli/utils/pipe-stdout.d.ts.map +1 -0
- package/dist/cli/utils/pipe-stdout.js +19 -0
- package/dist/cli/utils/pipe-stdout.js.map +1 -0
- package/dist/cli/utils/process-tree.d.ts +14 -0
- package/dist/cli/utils/process-tree.d.ts.map +1 -0
- package/dist/cli/utils/process-tree.js +78 -0
- package/dist/cli/utils/process-tree.js.map +1 -0
- package/dist/cli/utils/publish.js +12 -6
- package/dist/cli/utils/publish.js.map +1 -1
- package/dist/cli/utils/set-node-options.d.ts +2 -1
- package/dist/cli/utils/set-node-options.d.ts.map +1 -1
- package/dist/cli/utils/set-node-options.js +39 -30
- package/dist/cli/utils/set-node-options.js.map +1 -1
- package/dist/cli/utils/style-extensions.d.ts +2 -0
- package/dist/cli/utils/style-extensions.d.ts.map +1 -0
- package/dist/cli/utils/style-extensions.js +17 -0
- package/dist/cli/utils/style-extensions.js.map +1 -0
- package/dist/cli/utils/tcm.d.ts +5 -2
- package/dist/cli/utils/tcm.d.ts.map +1 -1
- package/dist/cli/utils/tcm.js +51 -46
- package/dist/cli/utils/tcm.js.map +1 -1
- package/dist/cli/utils/type-check.d.ts +7 -0
- package/dist/cli/utils/type-check.d.ts.map +1 -0
- package/dist/cli/utils/type-check.js +33 -0
- package/dist/cli/utils/type-check.js.map +1 -0
- package/dist/cli/utils/watch-stdout.d.ts +3 -0
- package/dist/cli/utils/watch-stdout.d.ts.map +1 -0
- package/dist/cli/utils/watch-stdout.js +26 -0
- package/dist/cli/utils/watch-stdout.js.map +1 -0
- package/dist/index.js +20 -18
- package/dist/index.js.map +1 -1
- package/dist/jest/index.js +12 -4
- package/dist/jest/index.js.map +1 -1
- package/dist/utils/debug.js +23 -11
- package/dist/utils/debug.js.map +1 -1
- package/dist/utils/find-packages.d.ts.map +1 -1
- package/dist/utils/find-packages.js +46 -34
- package/dist/utils/find-packages.js.map +1 -1
- package/dist/utils/format-duration.d.ts +2 -0
- package/dist/utils/format-duration.d.ts.map +1 -0
- package/dist/utils/format-duration.js +24 -0
- package/dist/utils/format-duration.js.map +1 -0
- package/dist/utils/get-branch-configs.js +24 -8
- package/dist/utils/get-branch-configs.js.map +1 -1
- package/dist/utils/get-configuration.d.ts +10 -2
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +120 -52
- package/dist/utils/get-configuration.js.map +1 -1
- package/dist/utils/get-destination-folders.js +25 -18
- package/dist/utils/get-destination-folders.js.map +1 -1
- package/dist/utils/get-folders.d.ts +2 -2
- package/dist/utils/get-folders.d.ts.map +1 -1
- package/dist/utils/get-folders.js +20 -13
- package/dist/utils/get-folders.js.map +1 -1
- package/dist/utils/get-jest-config.js +65 -38
- package/dist/utils/get-jest-config.js.map +1 -1
- package/dist/utils/get-package-data.js +26 -12
- package/dist/utils/get-package-data.js.map +1 -1
- package/dist/utils/get-package-name.js +18 -8
- package/dist/utils/get-package-name.js.map +1 -1
- package/dist/utils/get-packages.d.ts +1 -1
- package/dist/utils/get-packages.d.ts.map +1 -1
- package/dist/utils/get-packages.js +72 -57
- package/dist/utils/get-packages.js.map +1 -1
- package/dist/utils/get-startup-version.js +18 -8
- package/dist/utils/get-startup-version.js.map +1 -1
- package/dist/utils/get-tsconfig.js +19 -12
- package/dist/utils/get-tsconfig.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +34 -29
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/load-shared-dependencies.js +23 -17
- package/dist/utils/load-shared-dependencies.js.map +1 -1
- package/dist/utils/log-errors.d.ts +2 -0
- package/dist/utils/log-errors.d.ts.map +1 -0
- package/dist/utils/log-errors.js +36 -0
- package/dist/utils/log-errors.js.map +1 -0
- package/dist/utils/log.d.ts +0 -1
- package/dist/utils/log.d.ts.map +1 -1
- package/dist/utils/log.js +38 -43
- package/dist/utils/log.js.map +1 -1
- package/dist/utils/pick.js +11 -3
- package/dist/utils/pick.js.map +1 -1
- package/dist/utils/read-json.js +27 -11
- package/dist/utils/read-json.js.map +1 -1
- package/dist/utils/to-array.js +13 -3
- package/dist/utils/to-array.js.map +1 -1
- package/dist/webpack/__mocks__/file-rules.d.ts.map +1 -1
- package/dist/webpack/configs/amd-config.js +13 -3
- package/dist/webpack/configs/amd-config.js.map +1 -1
- package/dist/webpack/configs/cache-config.js +20 -9
- package/dist/webpack/configs/cache-config.js.map +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts.map +1 -1
- package/dist/webpack/configs/dev-server-config.js +47 -45
- package/dist/webpack/configs/dev-server-config.js.map +1 -1
- package/dist/webpack/configs/devtool-config.js +16 -7
- package/dist/webpack/configs/devtool-config.js.map +1 -1
- package/dist/webpack/configs/entry.config.d.ts.map +1 -1
- package/dist/webpack/configs/entry.config.js +28 -7
- package/dist/webpack/configs/entry.config.js.map +1 -1
- package/dist/webpack/configs/externals-config.js +17 -7
- package/dist/webpack/configs/externals-config.js.map +1 -1
- package/dist/webpack/configs/index.d.ts +2 -1
- package/dist/webpack/configs/index.d.ts.map +1 -1
- package/dist/webpack/configs/index.js +30 -28
- package/dist/webpack/configs/index.js.map +1 -1
- package/dist/webpack/configs/loaders/css-loader.js +22 -14
- package/dist/webpack/configs/loaders/css-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/index.d.ts +1 -1
- package/dist/webpack/configs/loaders/index.d.ts.map +1 -1
- package/dist/webpack/configs/loaders/index.js +20 -19
- package/dist/webpack/configs/loaders/index.js.map +1 -1
- package/dist/webpack/configs/loaders/less-loader.js +18 -3
- package/dist/webpack/configs/loaders/less-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/style-loader.js +23 -8
- package/dist/webpack/configs/loaders/style-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/types.js +4 -1
- package/dist/webpack/configs/loaders/types.js.map +1 -1
- package/dist/webpack/configs/module-config.js +17 -5
- package/dist/webpack/configs/module-config.js.map +1 -1
- package/dist/webpack/configs/optimization-config.js +54 -28
- package/dist/webpack/configs/optimization-config.js.map +1 -1
- package/dist/webpack/configs/output-config.js +26 -12
- package/dist/webpack/configs/output-config.js.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js +23 -14
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +19 -9
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js +19 -11
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js +17 -7
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js +13 -5
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js +11 -3
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/html-plugin.js +28 -20
- package/dist/webpack/configs/plugins/html-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js +24 -13
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js +26 -16
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +15 -6
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/index.js +18 -16
- package/dist/webpack/configs/plugins/ignore-plugin/index.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js +22 -12
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js +11 -4
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js.map +1 -1
- package/dist/webpack/configs/plugins/index.d.ts +0 -2
- package/dist/webpack/configs/plugins/index.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/index.js +29 -29
- package/dist/webpack/configs/plugins/index.js.map +1 -1
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js +23 -12
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.js +18 -8
- package/dist/webpack/configs/plugins/moment-locales-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js +32 -22
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/watch-run-plugin.js +23 -15
- package/dist/webpack/configs/plugins/watch-run-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins-config.d.ts.map +1 -1
- package/dist/webpack/configs/plugins-config.js +27 -21
- package/dist/webpack/configs/plugins-config.js.map +1 -1
- package/dist/webpack/configs/resolve-config.js +16 -4
- package/dist/webpack/configs/resolve-config.js.map +1 -1
- package/dist/webpack/configs/rules/css-rules.js +43 -18
- package/dist/webpack/configs/rules/css-rules.js.map +1 -1
- package/dist/webpack/configs/rules/font-rules.js +13 -5
- package/dist/webpack/configs/rules/font-rules.js.map +1 -1
- package/dist/webpack/configs/rules/image-rules.js +13 -5
- package/dist/webpack/configs/rules/image-rules.js.map +1 -1
- package/dist/webpack/configs/rules/index.d.ts +0 -1
- package/dist/webpack/configs/rules/index.d.ts.map +1 -1
- package/dist/webpack/configs/rules/index.js +24 -23
- package/dist/webpack/configs/rules/index.js.map +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/js-rules.js +47 -7
- package/dist/webpack/configs/rules/js-rules.js.map +1 -1
- package/dist/webpack/configs/rules/less-rules.js +25 -9
- package/dist/webpack/configs/rules/less-rules.js.map +1 -1
- package/dist/webpack/configs/rules/scss-rules.js +25 -9
- package/dist/webpack/configs/rules/scss-rules.js.map +1 -1
- package/dist/webpack/configs/rules/svg-rules.js +40 -20
- package/dist/webpack/configs/rules/svg-rules.js.map +1 -1
- package/dist/webpack/configs/rules-config.d.ts.map +1 -1
- package/dist/webpack/configs/rules-config.js +34 -19
- package/dist/webpack/configs/rules-config.js.map +1 -1
- package/dist/webpack/configs/stats-config.js +14 -4
- package/dist/webpack/configs/stats-config.js.map +1 -1
- package/dist/webpack/configs/types.d.ts +1 -3
- package/dist/webpack/configs/types.d.ts.map +1 -1
- package/dist/webpack/configs/types.js +4 -1
- package/dist/webpack/configs/types.js.map +1 -1
- package/dist/webpack/configs/utils/generate-metadata.js +40 -22
- package/dist/webpack/configs/utils/generate-metadata.js.map +1 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js +20 -11
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js.map +1 -1
- package/dist/webpack/configs/utils/get-web-components-version.js +18 -8
- package/dist/webpack/configs/utils/get-web-components-version.js.map +1 -1
- package/dist/webpack/configs/utils/index.js +18 -16
- package/dist/webpack/configs/utils/index.js.map +1 -1
- package/dist/webpack/configs/watch-options-config.d.ts +6 -0
- package/dist/webpack/configs/watch-options-config.d.ts.map +1 -0
- package/dist/webpack/configs/watch-options-config.js +24 -0
- package/dist/webpack/configs/watch-options-config.js.map +1 -0
- package/dist/webpack/create-webpack-config.d.ts.map +1 -1
- package/dist/webpack/create-webpack-config.js +62 -50
- package/dist/webpack/create-webpack-config.js.map +1 -1
- package/dist/webpack/index.d.ts +1 -1
- package/dist/webpack/index.d.ts.map +1 -1
- package/dist/webpack/index.js +18 -17
- package/dist/webpack/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/index.js +15 -15
- package/dist/webpack/loaders/expose-loader/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js +5 -6
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.js +20 -13
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js +22 -11
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/index.js +20 -18
- package/dist/webpack/loaders/expose-loader/utils/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.js +20 -12
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.js.map +1 -1
- package/dist/webpack/types.d.ts +0 -4
- package/dist/webpack/types.d.ts.map +1 -1
- package/dist/webpack/types.js +4 -1
- package/dist/webpack/types.js.map +1 -1
- package/dist/webpack/utils/feature-cohort.js +17 -12
- package/dist/webpack/utils/feature-cohort.js.map +1 -1
- package/dist/webpack/utils/get-caller-filename.js +14 -7
- package/dist/webpack/utils/get-caller-filename.js.map +1 -1
- package/dist/webpack/utils/{bundle.d.ts → get-module-entry-path.d.ts} +1 -1
- package/dist/webpack/utils/get-module-entry-path.d.ts.map +1 -0
- package/dist/webpack/utils/get-module-entry-path.js +21 -0
- package/dist/webpack/utils/get-module-entry-path.js.map +1 -0
- package/dist/webpack/utils/hash-mod.js +16 -11
- package/dist/webpack/utils/hash-mod.js.map +1 -1
- package/dist/webpack/utils/index.d.ts +1 -1
- package/dist/webpack/utils/index.d.ts.map +1 -1
- package/dist/webpack/utils/index.js +21 -19
- package/dist/webpack/utils/index.js.map +1 -1
- package/dist/webpack/utils/split-by-entry.js +17 -7
- package/dist/webpack/utils/split-by-entry.js.map +1 -1
- package/dist/webpack/utils/testing/compile.js +12 -4
- package/dist/webpack/utils/testing/compile.js.map +1 -1
- package/dist/webpack/utils/testing/execute.js +26 -13
- package/dist/webpack/utils/testing/execute.js.map +1 -1
- package/dist/webpack/utils/testing/get-compiler.js +34 -24
- package/dist/webpack/utils/testing/get-compiler.js.map +1 -1
- package/dist/webpack/utils/testing/get-errors.js +12 -4
- package/dist/webpack/utils/testing/get-errors.js.map +1 -1
- package/dist/webpack/utils/testing/get-module-source.js +18 -5
- package/dist/webpack/utils/testing/get-module-source.js.map +1 -1
- package/dist/webpack/utils/testing/get-warnings.js +12 -4
- package/dist/webpack/utils/testing/get-warnings.js.map +1 -1
- package/dist/webpack/utils/testing/index.js +28 -20
- package/dist/webpack/utils/testing/index.js.map +1 -1
- package/dist/webpack/utils/testing/normalize-errors.js +11 -3
- package/dist/webpack/utils/testing/normalize-errors.js.map +1 -1
- package/dist/webpack/utils/testing/read-asset.js +20 -11
- package/dist/webpack/utils/testing/read-asset.js.map +1 -1
- package/dist/webpack/utils/testing/read-assets.js +13 -5
- package/dist/webpack/utils/testing/read-assets.js.map +1 -1
- package/package.json +20 -20
- package/src/cli/commands/__tests__/build.test.ts +69 -44
- package/src/cli/commands/__tests__/clean.test.ts +32 -0
- package/src/cli/commands/__tests__/install.test.ts +50 -8
- package/src/cli/commands/__tests__/kendo-ui-license.test.ts +5 -5
- package/src/cli/commands/__tests__/lint.test.ts +4 -0
- package/src/cli/commands/__tests__/mfe-package-publish.test.ts +21 -2
- package/src/cli/commands/__tests__/mfe-publish.test.ts +19 -23
- package/src/cli/commands/__tests__/prepare-package.test.ts +17 -36
- package/src/cli/commands/__tests__/start.test.ts +81 -44
- package/src/cli/commands/__tests__/tests.test.ts +4 -0
- package/src/cli/commands/build.ts +73 -35
- package/src/cli/commands/bundle-package.ts +0 -4
- package/src/cli/commands/clean.ts +24 -0
- package/src/cli/commands/eslint.ts +1 -1
- package/src/cli/commands/get-command.ts +25 -35
- package/src/cli/commands/index.ts +1 -1
- package/src/cli/commands/install.ts +29 -8
- package/src/cli/commands/lint.ts +22 -17
- package/src/cli/commands/mfe-package-publish.ts +22 -5
- package/src/cli/commands/mfe-publish.ts +5 -18
- package/src/cli/commands/prepare-package.ts +8 -12
- package/src/cli/commands/review/__mocks__/expect-calls.ts +48 -0
- package/src/cli/commands/review/__mocks__/index.ts +1 -0
- package/src/cli/commands/review/__tests__/review.test.ts +483 -0
- package/src/cli/commands/review/index.ts +3 -0
- package/src/cli/commands/review/review.ts +247 -0
- package/src/cli/commands/review/rules/__mocks__/index.ts +3 -0
- package/src/cli/commands/review/rules/__mocks__/mock-config.ts +14 -0
- package/src/cli/commands/review/rules/__mocks__/mock-packages.ts +41 -0
- package/src/cli/commands/review/rules/__mocks__/mock-project.ts +11 -0
- package/src/cli/commands/review/rules/__tests__/no-typescript-entry-point.test.ts +166 -0
- package/src/cli/commands/review/rules/__tests__/require-explicit-side-effects.test.ts +113 -0
- package/src/cli/commands/review/rules/__tests__/require-npmrc.test.ts +71 -0
- package/src/cli/commands/review/rules/__tests__/require-one-anvil-uikit-contrib-version.test.ts +33 -0
- package/src/cli/commands/review/rules/__tests__/require-one-collection-version.test.ts +155 -0
- package/src/cli/commands/review/rules/__tests__/require-one-package-version.test.ts +135 -0
- package/src/cli/commands/review/rules/__tests__/require-one-uikit-version.ts +40 -0
- package/src/cli/commands/review/rules/__tests__/require-project-version-in-root-node-modules.test.ts +186 -0
- package/src/cli/commands/review/rules/__tests__/require-servicetitan-scope.test.ts +83 -0
- package/src/cli/commands/review/rules/index.ts +20 -0
- package/src/cli/commands/review/rules/no-typescript-entry-point.ts +78 -0
- package/src/cli/commands/review/rules/require-explicit-side-effects.ts +31 -0
- package/src/cli/commands/review/rules/require-npmrc.ts +27 -0
- package/src/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.ts +20 -0
- package/src/cli/commands/review/rules/require-one-collection-version.ts +169 -0
- package/src/cli/commands/review/rules/require-one-package-version.ts +76 -0
- package/src/cli/commands/review/rules/require-one-uikit-version.ts +27 -0
- package/src/cli/commands/review/rules/require-project-version-in-root-node-modules.ts +104 -0
- package/src/cli/commands/review/rules/require-servicetitan-scope.ts +27 -0
- package/src/cli/commands/review/types.ts +72 -0
- package/src/cli/commands/review/utils/__tests__/compare-version.test.ts +73 -0
- package/src/cli/commands/review/utils/__tests__/get-max-version.test.ts +17 -0
- package/src/cli/commands/review/utils/__tests__/indent.test.ts +41 -0
- package/src/cli/commands/review/utils/__tests__/name-to-location.test.ts +39 -0
- package/src/cli/commands/review/utils/__tests__/set-version.test.ts +84 -0
- package/src/cli/commands/review/utils/apply-filter.ts +14 -0
- package/src/cli/commands/review/utils/collate-dependencies.ts +46 -0
- package/src/cli/commands/review/utils/compare-version.ts +82 -0
- package/src/cli/commands/review/utils/format-depends-on.ts +11 -0
- package/src/cli/commands/review/utils/format-location.ts +8 -0
- package/src/cli/commands/review/utils/get-key.ts +10 -0
- package/src/cli/commands/review/utils/get-max-version.ts +5 -0
- package/src/cli/commands/review/utils/indent.ts +8 -0
- package/src/cli/commands/review/utils/index.ts +13 -0
- package/src/cli/commands/review/utils/is-library.ts +5 -0
- package/src/cli/commands/review/utils/name-to-location.ts +7 -0
- package/src/cli/commands/review/utils/pluralize.ts +3 -0
- package/src/cli/commands/review/utils/set-version.ts +26 -0
- package/src/cli/commands/review/utils/summarize.ts +21 -0
- package/src/cli/commands/run-task.test.ts +60 -0
- package/src/cli/commands/start.ts +130 -55
- package/src/cli/commands/tests.ts +2 -0
- package/src/cli/commands/types.ts +1 -0
- package/src/cli/index.ts +4 -4
- package/src/cli/tasks/__tests__/cli-task.test.ts +16 -4
- package/src/cli/tasks/__tests__/{swc-compile.test.ts → swc-compile-package.test.ts} +75 -36
- package/src/cli/tasks/__tests__/tsc-compile-package.test.ts +1 -0
- package/src/cli/tasks/__tests__/tsc-compile.test.ts +12 -23
- package/src/cli/tasks/cli-task.ts +12 -18
- package/src/cli/tasks/swc-cli.d.ts +12 -1
- package/src/cli/tasks/swc-compile-package.ts +71 -45
- package/src/cli/tasks/task.ts +2 -11
- package/src/cli/tasks/tsc-compile-package.ts +0 -4
- package/src/cli/tasks/tsc-compile.ts +14 -17
- package/src/cli/types/cpx2.d.ts +8 -1
- package/src/cli/utils/__tests__/bundle.test.ts +1 -1
- package/src/cli/utils/__tests__/check-args.test.ts +34 -0
- package/src/cli/utils/__tests__/compile.test.ts +59 -0
- package/src/cli/utils/__tests__/copy-files.test.ts +157 -0
- package/src/cli/utils/__tests__/get-module-type.test.ts +19 -0
- package/src/cli/utils/__tests__/lerna-exec.test.ts +58 -11
- package/src/cli/utils/__tests__/pipe-stdout.test.ts +39 -0
- package/src/cli/utils/__tests__/process-tree.test.ts +175 -0
- package/src/cli/utils/__tests__/set-node-options.test.ts +51 -6
- package/src/cli/utils/__tests__/tcm.test.ts +90 -86
- package/src/cli/utils/__tests__/type-check.test.ts +47 -0
- package/src/cli/utils/__tests__/watch-stdout.test.ts +68 -0
- package/src/cli/utils/bundle.ts +5 -18
- package/src/cli/utils/check-args.ts +13 -0
- package/src/cli/utils/compile-less.ts +0 -1
- package/src/cli/utils/compile-sass.ts +0 -1
- package/src/cli/utils/compile.ts +22 -0
- package/src/cli/utils/copy-files.ts +76 -0
- package/src/cli/utils/eslint.ts +1 -0
- package/src/cli/utils/get-module-type.ts +4 -6
- package/src/cli/utils/index.ts +7 -6
- package/src/cli/utils/lerna-exec.ts +17 -10
- package/src/cli/utils/pipe-stdout.ts +10 -0
- package/src/cli/utils/process-tree.ts +57 -0
- package/src/cli/utils/set-node-options.ts +15 -12
- package/src/cli/utils/style-extensions.ts +1 -0
- package/src/cli/utils/tcm.ts +22 -32
- package/src/cli/utils/type-check.ts +19 -0
- package/src/cli/utils/watch-stdout.ts +24 -0
- package/src/utils/__tests__/format-duration.test.ts +22 -0
- package/src/utils/__tests__/get-configuration.test.ts +44 -2
- package/src/utils/__tests__/get-packages.test.ts +58 -49
- package/src/utils/__tests__/log-errors.test.ts +102 -0
- package/src/utils/__tests__/log.test.ts +1 -86
- package/src/utils/find-packages.ts +12 -6
- package/src/utils/format-duration.ts +13 -0
- package/src/utils/get-configuration.ts +19 -5
- package/src/utils/get-folders.ts +3 -1
- package/src/utils/get-packages.ts +9 -16
- package/src/utils/index.ts +3 -0
- package/src/utils/log-errors.ts +29 -0
- package/src/utils/log.ts +0 -26
- package/src/webpack/__mocks__/file-rules.ts +0 -5
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +4 -5
- package/src/webpack/__tests__/create-webpack-config.test.ts +33 -112
- package/src/webpack/configs/dev-server-config.ts +4 -27
- package/src/webpack/configs/devtool-config.ts +2 -2
- package/src/webpack/configs/entry.config.ts +7 -2
- package/src/webpack/configs/index.ts +2 -1
- package/src/webpack/configs/loaders/index.ts +1 -1
- package/src/webpack/configs/optimization-config.ts +2 -2
- package/src/webpack/configs/plugins/index.ts +0 -2
- package/src/webpack/configs/plugins/virtual-modules-plugin.ts +3 -3
- package/src/webpack/configs/plugins-config.ts +0 -4
- package/src/webpack/configs/resolve-config.ts +1 -1
- package/src/webpack/configs/rules/index.ts +0 -1
- package/src/webpack/configs/rules/js-rules.ts +27 -2
- package/src/webpack/configs/rules-config.ts +1 -11
- package/src/webpack/configs/types.ts +1 -3
- package/src/webpack/configs/watch-options-config.ts +17 -0
- package/src/webpack/create-webpack-config.ts +3 -4
- package/src/webpack/index.ts +1 -1
- package/src/webpack/types.ts +0 -4
- package/src/webpack/utils/index.ts +1 -1
- package/dist/__mocks__/create-package.js +0 -17
- package/dist/__mocks__/create-package.js.map +0 -1
- package/dist/__mocks__/index.js +0 -18
- package/dist/__mocks__/index.js.map +0 -1
- package/dist/cli/utils/assets-copy.d.ts +0 -3
- package/dist/cli/utils/assets-copy.d.ts.map +0 -1
- package/dist/cli/utils/assets-copy.js +0 -25
- package/dist/cli/utils/assets-copy.js.map +0 -1
- package/dist/cli/utils/styles-copy.d.ts +0 -3
- package/dist/cli/utils/styles-copy.d.ts.map +0 -1
- package/dist/cli/utils/styles-copy.js +0 -25
- package/dist/cli/utils/styles-copy.js.map +0 -1
- package/dist/cli/utils/tsc.d.ts +0 -5
- package/dist/cli/utils/tsc.d.ts.map +0 -1
- package/dist/cli/utils/tsc.js +0 -37
- package/dist/cli/utils/tsc.js.map +0 -1
- package/dist/webpack/__mocks__/file-rules.js +0 -79
- package/dist/webpack/__mocks__/file-rules.js.map +0 -1
- package/dist/webpack/__mocks__/index.js +0 -19
- package/dist/webpack/__mocks__/index.js.map +0 -1
- package/dist/webpack/__mocks__/style-rules.js +0 -124
- package/dist/webpack/__mocks__/style-rules.js.map +0 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts +0 -4
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.js +0 -13
- package/dist/webpack/configs/plugins/provide-react-plugin.js.map +0 -1
- package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts +0 -4
- package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/ts-checker-plugin.js +0 -30
- package/dist/webpack/configs/plugins/ts-checker-plugin.js.map +0 -1
- package/dist/webpack/configs/rules/tsx-rules.d.ts +0 -4
- package/dist/webpack/configs/rules/tsx-rules.d.ts.map +0 -1
- package/dist/webpack/configs/rules/tsx-rules.js +0 -44
- package/dist/webpack/configs/rules/tsx-rules.js.map +0 -1
- package/dist/webpack/utils/bundle.d.ts.map +0 -1
- package/dist/webpack/utils/bundle.js +0 -19
- package/dist/webpack/utils/bundle.js.map +0 -1
- package/src/cli/utils/__tests__/assets-copy.test.ts +0 -52
- package/src/cli/utils/__tests__/styles-copy.test.ts +0 -52
- package/src/cli/utils/__tests__/tsc.test.ts +0 -63
- package/src/cli/utils/assets-copy.ts +0 -23
- package/src/cli/utils/styles-copy.ts +0 -23
- package/src/cli/utils/tsc.ts +0 -38
- package/src/webpack/configs/plugins/provide-react-plugin.ts +0 -12
- package/src/webpack/configs/plugins/ts-checker-plugin.ts +0 -33
- package/src/webpack/configs/rules/tsx-rules.ts +0 -48
- /package/src/webpack/utils/{bundle.ts → get-module-entry-path.ts} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import CssMinimizerWebpackPlugin from 'css-minimizer-webpack-plugin';
|
|
2
|
-
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
|
3
2
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
4
3
|
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
5
4
|
import { fs, vol } from 'memfs';
|
|
@@ -15,7 +14,6 @@ import { argv } from 'yargs';
|
|
|
15
14
|
|
|
16
15
|
import {
|
|
17
16
|
Package,
|
|
18
|
-
PackageType,
|
|
19
17
|
WebpackConfiguration,
|
|
20
18
|
getConfiguration,
|
|
21
19
|
getFolders,
|
|
@@ -30,7 +28,6 @@ import {
|
|
|
30
28
|
loadSharedDependencies,
|
|
31
29
|
log,
|
|
32
30
|
} from '../../utils';
|
|
33
|
-
import { createPackage } from '../../__mocks__';
|
|
34
31
|
import { fileRules, productionStyleRules, styleRules } from '../__mocks__';
|
|
35
32
|
import { featureCohort, splitByEntry } from '../utils';
|
|
36
33
|
|
|
@@ -38,7 +35,6 @@ import { createWebpackConfig } from '../index';
|
|
|
38
35
|
|
|
39
36
|
jest.mock('fs', () => fs);
|
|
40
37
|
jest.mock('css-minimizer-webpack-plugin', () => jest.fn());
|
|
41
|
-
jest.mock('fork-ts-checker-webpack-plugin', () => jest.fn());
|
|
42
38
|
jest.mock('html-webpack-plugin', () => jest.fn());
|
|
43
39
|
jest.mock('mini-css-extract-plugin', () =>
|
|
44
40
|
Object.assign(jest.fn(), { loader: 'MiniCssExtractPlugin.loader' })
|
|
@@ -110,7 +106,6 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
|
|
|
110
106
|
packages = [];
|
|
111
107
|
overrides = {
|
|
112
108
|
plugins: {
|
|
113
|
-
ForkTsCheckerWebpackPlugin: { logger: 'webpack-infrastructure' },
|
|
114
109
|
HtmlWebpackPlugin: { favicon: 'foo' },
|
|
115
110
|
MiniCssExtractPlugin: { attributes: { foo: 'bar' } },
|
|
116
111
|
},
|
|
@@ -126,9 +121,6 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
|
|
|
126
121
|
jest.mocked(MiniCssExtractPlugin).mockImplementation(mockPlugIn('MiniCssExtractPlugin'));
|
|
127
122
|
jest.mocked(BundleAnalyzerPlugin).mockImplementation(mockPlugIn('BundleAnalyzerPlugin'));
|
|
128
123
|
jest.mocked(FilterWarningsPlugin).mockImplementation(mockPlugIn('FilterWarningsPlugin'));
|
|
129
|
-
jest.mocked(ForkTsCheckerWebpackPlugin).mockImplementation(
|
|
130
|
-
mockPlugIn('ForkTsCheckerWebpackPlugin')
|
|
131
|
-
);
|
|
132
124
|
jest.mocked(HtmlWebpackPlugin).mockImplementation(mockPlugIn('HtmlWebpackPlugin'));
|
|
133
125
|
jest.mocked(IgnorePlugin).mockImplementation(mockPlugIn('IgnorePlugin'));
|
|
134
126
|
jest.mocked(MomentLocalesPlugin).mockImplementation(mockPlugIn('MomentLocalesPlugin'));
|
|
@@ -164,11 +156,11 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
|
|
|
164
156
|
const subject = () => createWebpackConfig(overrides, options);
|
|
165
157
|
|
|
166
158
|
test('configures "entry"', () => {
|
|
167
|
-
expect(subject().entry).toEqual({ main: [`./${
|
|
159
|
+
expect(subject().entry).toEqual({ main: [`./${destination}/index`] });
|
|
168
160
|
});
|
|
169
161
|
|
|
170
162
|
test('configures "resolve"', () => {
|
|
171
|
-
expect(subject().resolve).toEqual({ extensions: ['.js'
|
|
163
|
+
expect(subject().resolve).toEqual({ extensions: ['.js'] });
|
|
172
164
|
});
|
|
173
165
|
|
|
174
166
|
test('configures "devtool"', () => {
|
|
@@ -322,23 +314,9 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
|
|
|
322
314
|
});
|
|
323
315
|
});
|
|
324
316
|
|
|
325
|
-
test('configures "watchOptions"', () => {
|
|
326
|
-
expect(subject().watchOptions).toEqual({
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
describe('with subordinate TSC packages', () => {
|
|
330
|
-
beforeEach(() => {
|
|
331
|
-
packages = [
|
|
332
|
-
createPackage({ name: 'bar', type: PackageType.TSC }),
|
|
333
|
-
createPackage({ name: 'baz', type: PackageType.Webpack }),
|
|
334
|
-
];
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
test('configures "watchOptions" to ignore TSC source files', () => {
|
|
338
|
-
const ignored = packages
|
|
339
|
-
.filter(({ type }) => type === PackageType.TSC)
|
|
340
|
-
.map(({ location }) => path.join(location, getFolders(location).source));
|
|
341
|
-
expect(subject().watchOptions).toEqual({ ignored });
|
|
317
|
+
test('configures "watchOptions" to ignore source folder', () => {
|
|
318
|
+
expect(subject().watchOptions).toEqual({
|
|
319
|
+
ignored: ['**/node_modules'],
|
|
342
320
|
});
|
|
343
321
|
});
|
|
344
322
|
|
|
@@ -359,85 +337,38 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
|
|
|
359
337
|
});
|
|
360
338
|
|
|
361
339
|
function itConfiguresCodeCoverage() {
|
|
362
|
-
test('configures ".
|
|
340
|
+
test('configures ".js" rules to use coverage-istanbul-loader', () => {
|
|
363
341
|
expect(subject().module?.rules).toEqual(
|
|
364
342
|
expect.arrayContaining([
|
|
365
343
|
expect.objectContaining({
|
|
366
|
-
|
|
367
|
-
|
|
344
|
+
enforce: 'post',
|
|
345
|
+
test: /\.js$/,
|
|
346
|
+
include: [path.resolve(destination)],
|
|
347
|
+
exclude: /node_modules/,
|
|
348
|
+
use: expect.objectContaining({
|
|
349
|
+
loader: '@jsdevtools/coverage-istanbul-loader',
|
|
350
|
+
options: {
|
|
351
|
+
compact: false,
|
|
352
|
+
produceSourceMap: true,
|
|
353
|
+
},
|
|
354
|
+
}),
|
|
368
355
|
}),
|
|
369
356
|
])
|
|
370
357
|
);
|
|
371
358
|
});
|
|
372
359
|
}
|
|
373
|
-
|
|
374
|
-
test('configures ".tsx" rules to use esbuild-loader', () => {
|
|
375
|
-
expect(subject().module?.rules).toContainEqual({
|
|
376
|
-
test: /\.tsx?$/,
|
|
377
|
-
exclude: /node_modules/,
|
|
378
|
-
use: [{ loader: 'esbuild-loader', options: { target: 'es2018' } }],
|
|
379
|
-
});
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
function itConfiguresSwcLoader() {
|
|
383
|
-
test('configures ".tsx" rules to use swc-loader', () => {
|
|
384
|
-
expect(subject().module?.rules).toContainEqual({
|
|
385
|
-
test: /\.tsx?$/,
|
|
386
|
-
exclude: /node_modules/,
|
|
387
|
-
use: [
|
|
388
|
-
{
|
|
389
|
-
loader: 'swc-loader',
|
|
390
|
-
options: {
|
|
391
|
-
jsc: {
|
|
392
|
-
parser: { syntax: 'typescript', tsx: true, decorators: true },
|
|
393
|
-
target: 'es2018',
|
|
394
|
-
transform: { legacyDecorator: true, decoratorMetadata: true },
|
|
395
|
-
},
|
|
396
|
-
},
|
|
397
|
-
},
|
|
398
|
-
],
|
|
399
|
-
});
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
function itConfiguresReactToLoadAutomatically() {
|
|
403
|
-
test('configures React to load automatically', () => {
|
|
404
|
-
expect(subject().plugins).toContainEqual(new ProvidePlugin({ React: 'react' }));
|
|
405
|
-
});
|
|
406
|
-
}
|
|
360
|
+
|
|
407
361
|
describe('with --code-coverage command line argument', () => {
|
|
408
362
|
beforeEach(() => Object.assign(argv, { 'code-coverage': true }));
|
|
409
363
|
itConfiguresCodeCoverage();
|
|
410
364
|
});
|
|
411
|
-
|
|
365
|
+
|
|
366
|
+
describe('when codeCoverage is turned on', () => {
|
|
412
367
|
beforeEach(() => {
|
|
413
368
|
options = { codeCoverage: true };
|
|
414
369
|
});
|
|
415
370
|
itConfiguresCodeCoverage();
|
|
416
371
|
});
|
|
417
|
-
describe('with --esbuild command line argument', () => {
|
|
418
|
-
beforeEach(() => Object.assign(argv, { esbuild: true }));
|
|
419
|
-
itConfiguresESBuildLoader();
|
|
420
|
-
itConfiguresReactToLoadAutomatically();
|
|
421
|
-
});
|
|
422
|
-
describe('with esbuild option', () => {
|
|
423
|
-
beforeEach(() => {
|
|
424
|
-
options = { esbuild: true };
|
|
425
|
-
});
|
|
426
|
-
itConfiguresESBuildLoader();
|
|
427
|
-
itConfiguresReactToLoadAutomatically();
|
|
428
|
-
});
|
|
429
|
-
describe('with experimental-bundlers option', () => {
|
|
430
|
-
beforeEach(() => {
|
|
431
|
-
options = { experimentalBundlers: true };
|
|
432
|
-
});
|
|
433
|
-
itConfiguresSwcLoader();
|
|
434
|
-
itConfiguresReactToLoadAutomatically();
|
|
435
|
-
});
|
|
436
|
-
describe('with --experimental-bundlers command line argument', () => {
|
|
437
|
-
beforeEach(() => Object.assign(argv, { 'experimental-bundlers': true }));
|
|
438
|
-
itConfiguresSwcLoader();
|
|
439
|
-
itConfiguresReactToLoadAutomatically();
|
|
440
|
-
});
|
|
441
372
|
|
|
442
373
|
test('configures ".css" rule to exclude .module.css files', () => {
|
|
443
374
|
const cssRule: any = subject().module?.rules?.find(({ test: regexp }: { test: RegExp }) =>
|
|
@@ -454,26 +385,6 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
|
|
|
454
385
|
);
|
|
455
386
|
});
|
|
456
387
|
|
|
457
|
-
test('configures ForkTsCheckerWebpackPlugin plugin', () => {
|
|
458
|
-
expect(subject().plugins).toContainEqual(
|
|
459
|
-
new ForkTsCheckerWebpackPlugin({
|
|
460
|
-
typescript: {
|
|
461
|
-
configFile: tsConfig,
|
|
462
|
-
configOverwrite: {
|
|
463
|
-
exclude: [
|
|
464
|
-
'**/__tests__/**/*',
|
|
465
|
-
'**/__mocks__/**/*',
|
|
466
|
-
'**/*.test.*',
|
|
467
|
-
'**/*.stories.tsx',
|
|
468
|
-
],
|
|
469
|
-
references: [],
|
|
470
|
-
},
|
|
471
|
-
},
|
|
472
|
-
...overrides.plugins?.ForkTsCheckerWebpackPlugin,
|
|
473
|
-
})
|
|
474
|
-
);
|
|
475
|
-
});
|
|
476
|
-
|
|
477
388
|
test('configures FilterWarningsPlugin plugin', () => {
|
|
478
389
|
expect(subject().plugins).toContainEqual(
|
|
479
390
|
new FilterWarningsPlugin({
|
|
@@ -663,9 +574,7 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
|
|
|
663
574
|
]);
|
|
664
575
|
});
|
|
665
576
|
|
|
666
|
-
|
|
667
|
-
beforeEach(() => (configuration = { webpack: { minify: { css: false, js: false } } }));
|
|
668
|
-
|
|
577
|
+
function itTurnsOffMinimizer() {
|
|
669
578
|
test('changes "optimization.minimize" to false', () => {
|
|
670
579
|
expect(subject().optimization?.minimize).toBe(false);
|
|
671
580
|
});
|
|
@@ -673,6 +582,18 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
|
|
|
673
582
|
test('omits "optimization.minimizer"', () => {
|
|
674
583
|
expect(subject().optimization?.minimizer).toBeUndefined();
|
|
675
584
|
});
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
describe('when minification is turned off', () => {
|
|
588
|
+
beforeEach(() => (configuration = { webpack: { minify: { css: false, js: false } } }));
|
|
589
|
+
|
|
590
|
+
itTurnsOffMinimizer();
|
|
591
|
+
});
|
|
592
|
+
|
|
593
|
+
describe('when codeCoverage is turned on', () => {
|
|
594
|
+
beforeEach(() => (options = { codeCoverage: true }));
|
|
595
|
+
|
|
596
|
+
itTurnsOffMinimizer();
|
|
676
597
|
});
|
|
677
598
|
|
|
678
599
|
describe('with CSS minification options', () => {
|
|
@@ -2,11 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { Configuration } from 'webpack';
|
|
4
4
|
import {
|
|
5
|
-
PackageType,
|
|
6
5
|
allowedWebpackDevServerOptions,
|
|
7
|
-
getFolders,
|
|
8
|
-
getPackageName,
|
|
9
|
-
getPackages,
|
|
10
6
|
getWebpackConfiguration,
|
|
11
7
|
isDevServerDisabled,
|
|
12
8
|
log,
|
|
@@ -16,19 +12,13 @@ import { statsConfig } from './stats-config';
|
|
|
16
12
|
import { Context, Overrides } from './types';
|
|
17
13
|
|
|
18
14
|
type DevServerConfig = NonNullable<Configuration['devServer']>;
|
|
19
|
-
type
|
|
20
|
-
type Result = Pick<Configuration, 'devServer' | 'watchOptions'> | undefined;
|
|
15
|
+
type Result = Pick<Configuration, 'devServer'> | undefined;
|
|
21
16
|
|
|
22
17
|
export function devServerConfig(context: Context, overrides: Overrides): Result {
|
|
23
|
-
if (context.isProduction) {
|
|
18
|
+
if (context.isProduction || isDevServerDisabled()) {
|
|
24
19
|
return;
|
|
25
20
|
}
|
|
26
21
|
|
|
27
|
-
const watchOptions = watchOptionsConfig();
|
|
28
|
-
if (isDevServerDisabled()) {
|
|
29
|
-
return { watchOptions };
|
|
30
|
-
}
|
|
31
|
-
|
|
32
22
|
const devServer = {
|
|
33
23
|
hot: false,
|
|
34
24
|
port: 8080,
|
|
@@ -42,8 +32,8 @@ export function devServerConfig(context: Context, overrides: Overrides): Result
|
|
|
42
32
|
};
|
|
43
33
|
|
|
44
34
|
/* istanbul ignore next: debug only */
|
|
45
|
-
log.debug('dev-server-config', () => JSON.stringify({ devServer
|
|
46
|
-
return { devServer
|
|
35
|
+
log.debug('dev-server-config', () => JSON.stringify({ devServer }, null, 2));
|
|
36
|
+
return { devServer };
|
|
47
37
|
}
|
|
48
38
|
|
|
49
39
|
function getDevServerConfig() {
|
|
@@ -75,19 +65,6 @@ function getDevServerConfig() {
|
|
|
75
65
|
return { ...result, ...webpack.devServer } as Partial<DevServerConfig>;
|
|
76
66
|
}
|
|
77
67
|
|
|
78
|
-
function watchOptionsConfig(): WatchOptionsConfig {
|
|
79
|
-
const ignored = getPackages({ scope: getPackageName() })
|
|
80
|
-
.filter(({ type }) => type === PackageType.TSC)
|
|
81
|
-
.map(({ location }) => path.join(location, getFolders(location).source));
|
|
82
|
-
|
|
83
|
-
/*
|
|
84
|
-
* NOTE: Don't return empty ignored array. It triggered a bug that caused
|
|
85
|
-
* webpack to ignore all files
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
return ignored.length ? { ignored } : {};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
68
|
const CONTENT_BASE_DEPRECATION_WARNING = `
|
|
92
69
|
DEPRECATION WARNING: webpack.contentBase in package.json is deprecated.
|
|
93
70
|
Use webpack.static instead.
|
|
@@ -5,11 +5,11 @@ type Config = Configuration['devtool'];
|
|
|
5
5
|
type Result = Pick<Configuration, 'devtool'>;
|
|
6
6
|
|
|
7
7
|
export function devtoolConfig(context: Context, _: Overrides): Result {
|
|
8
|
-
const { isProduction
|
|
8
|
+
const { isProduction } = context;
|
|
9
9
|
let devtool: Config;
|
|
10
10
|
|
|
11
11
|
if (isProduction) {
|
|
12
|
-
devtool =
|
|
12
|
+
devtool = 'source-map';
|
|
13
13
|
} else {
|
|
14
14
|
devtool = 'cheap-module-source-map';
|
|
15
15
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
1
2
|
import { Configuration } from 'webpack';
|
|
2
3
|
import { getModuleEntryPath } from '../utils';
|
|
3
4
|
import { Context, Overrides } from './types';
|
|
@@ -6,9 +7,13 @@ type Config = Configuration['entry'];
|
|
|
6
7
|
type Result = Pick<Configuration, 'entry'>;
|
|
7
8
|
|
|
8
9
|
export function entryConfig(context: Context, _: Overrides): Result {
|
|
9
|
-
const { isExposeSharedDependencies, sharedDependencies, source } = context;
|
|
10
|
+
const { destination, isExposeSharedDependencies, sharedDependencies, source } = context;
|
|
10
11
|
|
|
11
|
-
const
|
|
12
|
+
const index = fs.existsSync(`./${source}/index.js`)
|
|
13
|
+
? `./${source}/index`
|
|
14
|
+
: `./${destination}/index`;
|
|
15
|
+
|
|
16
|
+
const entry: Config = { main: [index] };
|
|
12
17
|
|
|
13
18
|
if (isExposeSharedDependencies) {
|
|
14
19
|
(entry.main as string[]).push(...Object.keys(sharedDependencies).map(getModuleEntryPath));
|
|
@@ -29,14 +29,14 @@ export function optimizationConfig(context: Context, _: Overrides): Result {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function minimizeConfig(optimization: ConfigWithCacheGroups, context: Context) {
|
|
32
|
-
const { isProduction } = context;
|
|
32
|
+
const { isProduction, codeCoverage } = context;
|
|
33
33
|
if (!isProduction) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const minifyJs = context.minify?.js ?? true;
|
|
38
38
|
const minifyCss = context.minify?.css ?? true;
|
|
39
|
-
optimization.minimize = !!minifyJs || !!minifyCss;
|
|
39
|
+
optimization.minimize = !codeCoverage && (!!minifyJs || !!minifyCss);
|
|
40
40
|
if (!optimization.minimize) {
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
@@ -8,7 +8,5 @@ export * from './html-plugin';
|
|
|
8
8
|
export * from './ignore-plugin';
|
|
9
9
|
export * from './mini-css-extract-plugin';
|
|
10
10
|
export * from './moment-locales-plugin';
|
|
11
|
-
export * from './provide-react-plugin';
|
|
12
|
-
export * from './ts-checker-plugin';
|
|
13
11
|
export * from './virtual-modules-plugin';
|
|
14
12
|
export * from './watch-run-plugin';
|
|
@@ -8,15 +8,15 @@ export function virtualModulesPlugin(context: Context, _: Overrides) {
|
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const {
|
|
11
|
+
const { destination } = context;
|
|
12
12
|
|
|
13
|
-
const indexPath = path.join(process.cwd(), `${
|
|
13
|
+
const indexPath = path.join(process.cwd(), `${destination}/index`);
|
|
14
14
|
const modules: ConstructorParameters<typeof VirtualModulesPlugin>[0] = {
|
|
15
15
|
[indexPath]: indexCode(context),
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
if (needsToIncludeDesignSystem(context)) {
|
|
19
|
-
const designSystemPath = path.join(process.cwd(), `${
|
|
19
|
+
const designSystemPath = path.join(process.cwd(), `${destination}/design-system.css`);
|
|
20
20
|
if (!fs.existsSync(designSystemPath)) {
|
|
21
21
|
modules[designSystemPath] = designSystemCode();
|
|
22
22
|
}
|
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
ignorePlugin,
|
|
11
11
|
miniCssExtractPlugin,
|
|
12
12
|
momentLocalesPlugin,
|
|
13
|
-
provideReactPlugin,
|
|
14
|
-
tsCheckerPlugin,
|
|
15
13
|
virtualModulesPlugin,
|
|
16
14
|
watchRunPlugin,
|
|
17
15
|
} from './plugins';
|
|
@@ -32,8 +30,6 @@ export function pluginsConfig(context: Context, overrides: Overrides): Result {
|
|
|
32
30
|
ignorePlugin,
|
|
33
31
|
miniCssExtractPlugin,
|
|
34
32
|
momentLocalesPlugin,
|
|
35
|
-
tsCheckerPlugin,
|
|
36
|
-
provideReactPlugin,
|
|
37
33
|
virtualModulesPlugin,
|
|
38
34
|
watchRunPlugin,
|
|
39
35
|
]
|
|
@@ -1,17 +1,42 @@
|
|
|
1
|
+
import path from 'path';
|
|
1
2
|
import { RuleSetRule } from 'webpack';
|
|
2
3
|
import { Context } from '../types';
|
|
3
4
|
|
|
4
|
-
export function jsRules(
|
|
5
|
-
|
|
5
|
+
export function jsRules({ codeCoverage, destination }: Context): RuleSetRule[] {
|
|
6
|
+
const result: RuleSetRule[] = [
|
|
6
7
|
{
|
|
7
8
|
enforce: 'pre',
|
|
8
9
|
test: /\.js$/,
|
|
9
10
|
exclude: /node_modules/,
|
|
10
11
|
loader: 'source-map-loader',
|
|
11
12
|
},
|
|
13
|
+
{
|
|
14
|
+
test: /\.js$/,
|
|
15
|
+
resolve: {
|
|
16
|
+
fullySpecified: false,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
12
19
|
{
|
|
13
20
|
test: /\.worker\.js$/,
|
|
14
21
|
use: { loader: 'worker-loader' },
|
|
15
22
|
},
|
|
16
23
|
];
|
|
24
|
+
|
|
25
|
+
if (codeCoverage) {
|
|
26
|
+
result.push({
|
|
27
|
+
enforce: 'post',
|
|
28
|
+
test: /\.js$/,
|
|
29
|
+
include: [path.resolve(destination)],
|
|
30
|
+
exclude: /node_modules/,
|
|
31
|
+
use: {
|
|
32
|
+
loader: '@jsdevtools/coverage-istanbul-loader',
|
|
33
|
+
options: {
|
|
34
|
+
compact: false,
|
|
35
|
+
produceSourceMap: true,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return result;
|
|
17
42
|
}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { Configuration, RuleSetRule } from 'webpack';
|
|
2
2
|
import { getModuleEntryPath } from '../utils';
|
|
3
|
-
import {
|
|
4
|
-
cssRules,
|
|
5
|
-
fontRules,
|
|
6
|
-
imageRules,
|
|
7
|
-
jsRules,
|
|
8
|
-
lessRules,
|
|
9
|
-
scssRules,
|
|
10
|
-
svgRules,
|
|
11
|
-
tsxRules,
|
|
12
|
-
} from './rules';
|
|
3
|
+
import { cssRules, fontRules, imageRules, jsRules, lessRules, scssRules, svgRules } from './rules';
|
|
13
4
|
import { Context, Overrides } from './types';
|
|
14
5
|
|
|
15
6
|
type Config = NonNullable<Configuration['module']>['rules'];
|
|
@@ -22,7 +13,6 @@ export function rulesConfig(context: Context, _: Overrides): Result {
|
|
|
22
13
|
jsRules,
|
|
23
14
|
imageRules,
|
|
24
15
|
fontRules,
|
|
25
|
-
tsxRules,
|
|
26
16
|
svgRules,
|
|
27
17
|
sharedDependenciesRules,
|
|
28
18
|
].flatMap(fn => fn(context));
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { getPackageData, loadSharedDependencies, MinifyOptions } from '../../utils';
|
|
2
2
|
import { Options } from '../types';
|
|
3
|
-
export { Overrides } from '../types';
|
|
3
|
+
export type { Overrides } from '../types';
|
|
4
4
|
|
|
5
5
|
export interface Context extends Options {
|
|
6
6
|
codeCoverage: boolean;
|
|
7
7
|
destination: string;
|
|
8
|
-
esbuild: boolean;
|
|
9
|
-
experimentalBundlers: boolean;
|
|
10
8
|
isCustomStyleRules: boolean;
|
|
11
9
|
isExposeSharedDependencies: boolean;
|
|
12
10
|
isLegacyRoot: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Configuration } from 'webpack';
|
|
2
|
+
import { Context } from './types';
|
|
3
|
+
|
|
4
|
+
type Config = Configuration['watchOptions'];
|
|
5
|
+
type Result = Pick<Configuration, 'watchOptions'> | undefined;
|
|
6
|
+
|
|
7
|
+
export function watchOptionsConfig({ isProduction }: Context): Result {
|
|
8
|
+
if (isProduction) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const watchOptions: Config = {};
|
|
13
|
+
|
|
14
|
+
watchOptions.ignored = ['**/node_modules'];
|
|
15
|
+
|
|
16
|
+
return { watchOptions };
|
|
17
|
+
}
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
pluginsConfig,
|
|
29
29
|
resolveConfig,
|
|
30
30
|
statsConfig,
|
|
31
|
+
watchOptionsConfig,
|
|
31
32
|
} from './configs';
|
|
32
33
|
import { Options, Overrides } from './types';
|
|
33
34
|
import { getCallerFile } from './utils';
|
|
@@ -46,9 +47,6 @@ export function createWebpackConfig(overrides: Overrides, options: Options = {})
|
|
|
46
47
|
const context: Context = {
|
|
47
48
|
codeCoverage: options.codeCoverage ?? !!(argv as Arguments)['code-coverage'],
|
|
48
49
|
destination,
|
|
49
|
-
esbuild: options.esbuild ?? !!(argv as Arguments).esbuild,
|
|
50
|
-
experimentalBundlers:
|
|
51
|
-
options.experimentalBundlers ?? !!(argv as Arguments)['experimental-bundlers'],
|
|
52
50
|
isCustomStyleRules: isCustomStyleRules(),
|
|
53
51
|
isExposeSharedDependencies: isExposeSharedDependencies(),
|
|
54
52
|
isLegacyRoot: isLegacyRoot(),
|
|
@@ -68,6 +66,7 @@ export function createWebpackConfig(overrides: Overrides, options: Options = {})
|
|
|
68
66
|
|
|
69
67
|
const result = merge(
|
|
70
68
|
[
|
|
69
|
+
amdConfig,
|
|
71
70
|
cacheConfig,
|
|
72
71
|
devServerConfig,
|
|
73
72
|
devtoolConfig,
|
|
@@ -79,7 +78,7 @@ export function createWebpackConfig(overrides: Overrides, options: Options = {})
|
|
|
79
78
|
pluginsConfig,
|
|
80
79
|
resolveConfig,
|
|
81
80
|
statsConfig,
|
|
82
|
-
|
|
81
|
+
watchOptionsConfig,
|
|
83
82
|
].reduce((result, fn) => ({ ...result, ...fn(context, overrides) }), {}),
|
|
84
83
|
configuration
|
|
85
84
|
);
|
package/src/webpack/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './create-webpack-config';
|
|
2
|
-
export * from './types';
|
|
2
|
+
export type * from './types';
|
package/src/webpack/types.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ForkTsCheckerWebpackPluginOptions } from 'fork-ts-checker-webpack-plugin/lib/plugin-options';
|
|
2
1
|
import { Options as HtmlWebpackPluginOptions } from 'html-webpack-plugin';
|
|
3
2
|
import { PluginOptions as MiniCssExtractPlugInOptions } from 'mini-css-extract-plugin';
|
|
4
3
|
import { Configuration } from 'webpack';
|
|
@@ -7,15 +6,12 @@ export interface Options {
|
|
|
7
6
|
buildStat?: boolean;
|
|
8
7
|
codeCoverage?: boolean;
|
|
9
8
|
embed?: boolean;
|
|
10
|
-
esbuild?: boolean;
|
|
11
|
-
experimentalBundlers?: boolean;
|
|
12
9
|
name?: string;
|
|
13
10
|
}
|
|
14
11
|
|
|
15
12
|
export interface Overrides {
|
|
16
13
|
configuration?: Configuration;
|
|
17
14
|
plugins?: {
|
|
18
|
-
ForkTsCheckerWebpackPlugin?: ForkTsCheckerWebpackPluginOptions;
|
|
19
15
|
HtmlWebpackPlugin?: HtmlWebpackPluginOptions;
|
|
20
16
|
MiniCssExtractPlugin?: MiniCssExtractPlugInOptions;
|
|
21
17
|
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPackage = createPackage;
|
|
4
|
-
const utils_1 = require("../utils");
|
|
5
|
-
function createPackage(props) {
|
|
6
|
-
var _a;
|
|
7
|
-
const baseName = (_a = props.name) === null || _a === void 0 ? void 0 : _a.split('/').pop();
|
|
8
|
-
return {
|
|
9
|
-
name: '@servicetitan/foo',
|
|
10
|
-
type: utils_1.PackageType.Legacy,
|
|
11
|
-
version: '1.0.0',
|
|
12
|
-
private: false,
|
|
13
|
-
location: `packages/${baseName !== null && baseName !== void 0 ? baseName : 'foo'}`,
|
|
14
|
-
...props,
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=create-package.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-package.js","sourceRoot":"","sources":["../../src/__mocks__/create-package.ts"],"names":[],"mappings":";;AAEA,sCAUC;AAZD,oCAAgD;AAEhD,SAAgB,aAAa,CAAC,KAAuB;;IACjD,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IAC9C,OAAO;QACH,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,mBAAW,CAAC,MAAM;QACxB,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,YAAY,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,KAAK,EAAE;QACzC,GAAG,KAAK;KACX,CAAC;AACN,CAAC"}
|
package/dist/__mocks__/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./create-package"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/__mocks__/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
|