@nestjs/cli 9.1.4 → 9.1.6

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.
@@ -21,12 +21,12 @@ jobs:
21
21
  build:
22
22
  working_directory: ~/nest
23
23
  docker:
24
- - image: cimg/node:17.9
24
+ - image: cimg/node:19.3
25
25
  steps:
26
26
  - checkout
27
27
  - run:
28
28
  name: Update NPM version
29
- command: npm install -g npm@latest
29
+ command: sudo npm install -g npm@latest
30
30
  - restore_cache:
31
31
  key: dependency-cache-{{ checksum "package.json" }}
32
32
  - run:
@@ -43,7 +43,7 @@ jobs:
43
43
  unit_tests:
44
44
  working_directory: ~/nest
45
45
  docker:
46
- - image: cimg/node:17.9
46
+ - image: cimg/node:19.3
47
47
  steps:
48
48
  - checkout
49
49
  - *restore-cache
@@ -26,7 +26,8 @@ class AddAction extends abstract_action_1.AbstractAction {
26
26
  const packageName = this.getPackageName(libraryName);
27
27
  const collectionName = this.getCollectionName(libraryName, packageName);
28
28
  const tagName = this.getTagName(packageName);
29
- const packageInstallSuccess = yield this.installPackage(collectionName, tagName);
29
+ const skipInstall = (0, project_utils_1.hasValidOptionFlag)('skip-install', options);
30
+ const packageInstallSuccess = skipInstall || (yield this.installPackage(collectionName, tagName));
30
31
  if (packageInstallSuccess) {
31
32
  const sourceRootOption = yield this.getSourceRoot(inputs.concat(options));
32
33
  options.push(sourceRootOption);
@@ -88,7 +88,6 @@ class BuildAction extends abstract_action_1.AbstractAction {
88
88
  }
89
89
  else {
90
90
  this.compiler.run(configuration, pathToTsconfig, appName, onSuccess);
91
- this.assetsManager.closeWatchers();
92
91
  }
93
92
  });
94
93
  }
@@ -33,6 +33,7 @@ const generateFiles = (inputs) => __awaiter(void 0, void 0, void 0, function* ()
33
33
  const appName = inputs.find((option) => option.name === 'project')
34
34
  .value;
35
35
  const spec = inputs.find((option) => option.name === 'spec');
36
+ const flat = inputs.find((option) => option.name === 'flat');
36
37
  const collection = schematics_1.CollectionFactory.create(collectionOption || configuration.collection || schematics_1.Collection.NESTJS);
37
38
  const schematicOptions = mapSchematicOptions(inputs);
38
39
  schematicOptions.push(new schematics_1.SchematicOption('language', configuration.language));
@@ -41,8 +42,10 @@ const generateFiles = (inputs) => __awaiter(void 0, void 0, void 0, function* ()
41
42
  ? (0, get_value_or_default_1.getValueOrDefault)(configuration, 'sourceRoot', appName)
42
43
  : configuration.sourceRoot;
43
44
  const specValue = spec.value;
45
+ const flatValue = !!flat;
44
46
  const specOptions = spec.options;
45
47
  let generateSpec = (0, project_utils_1.shouldGenerateSpec)(configuration, schematic, appName, specValue, specOptions.passedAsInput);
48
+ let generateFlat = (0, project_utils_1.shouldGenerateFlat)(configuration, appName, flatValue);
46
49
  // If you only add a `lib` we actually don't have monorepo: true BUT we do have "projects"
47
50
  // Ensure we don't run for new app/libs schematics
48
51
  if ((0, project_utils_1.shouldAskForProject)(schematic, configurationProjects, appName)) {
@@ -63,10 +66,12 @@ const generateFiles = (inputs) => __awaiter(void 0, void 0, void 0, function* ()
63
66
  if (answers.appName !== defaultProjectName) {
64
67
  // Only overwrite if the appName is not the default- as it has already been loaded above
65
68
  generateSpec = (0, project_utils_1.shouldGenerateSpec)(configuration, schematic, answers.appName, specValue, specOptions.passedAsInput);
69
+ generateFlat = (0, project_utils_1.shouldGenerateFlat)(configuration, answers.appNames, flatValue);
66
70
  }
67
71
  }
68
72
  schematicOptions.push(new schematics_1.SchematicOption('sourceRoot', sourceRoot));
69
73
  schematicOptions.push(new schematics_1.SchematicOption('spec', generateSpec));
74
+ schematicOptions.push(new schematics_1.SchematicOption('flat', generateFlat));
70
75
  try {
71
76
  const schematicInput = inputs.find((input) => input.name === 'schematic');
72
77
  if (!schematicInput) {
@@ -81,7 +86,7 @@ const generateFiles = (inputs) => __awaiter(void 0, void 0, void 0, function* ()
81
86
  }
82
87
  });
83
88
  const mapSchematicOptions = (inputs) => {
84
- const excludedInputNames = ['schematic', 'spec'];
89
+ const excludedInputNames = ['schematic', 'spec', 'flat'];
85
90
  const options = [];
86
91
  inputs.forEach((input) => {
87
92
  if (!excludedInputNames.includes(input.name) && input.value !== undefined) {
@@ -30,7 +30,7 @@ class NewAction extends abstract_action_1.AbstractAction {
30
30
  const directoryOption = options.find((option) => option.name === 'directory');
31
31
  const dryRunOption = options.find((option) => option.name === 'dry-run');
32
32
  const isDryRunEnabled = dryRunOption && dryRunOption.value;
33
- yield askForMissingInformation(inputs);
33
+ yield askForMissingInformation(inputs, options);
34
34
  yield generateApplicationFiles(inputs, options).catch(exports.exit);
35
35
  const shouldSkipInstall = options.some((option) => option.name === 'skip-install' && option.value === true);
36
36
  const shouldSkipGit = options.some((option) => option.name === 'skip-git' && option.value === true);
@@ -51,11 +51,12 @@ class NewAction extends abstract_action_1.AbstractAction {
51
51
  }
52
52
  exports.NewAction = NewAction;
53
53
  const getApplicationNameInput = (inputs) => inputs.find((input) => input.name === 'name');
54
+ const getPackageManagerInput = (inputs) => inputs.find((options) => options.name === 'packageManager');
54
55
  const getProjectDirectory = (applicationName, directoryOption) => {
55
56
  return ((directoryOption && directoryOption.value) ||
56
57
  (0, formatting_1.normalizeToKebabOrSnakeCase)(applicationName.value));
57
58
  };
58
- const askForMissingInformation = (inputs) => __awaiter(void 0, void 0, void 0, function* () {
59
+ const askForMissingInformation = (inputs, options) => __awaiter(void 0, void 0, void 0, function* () {
59
60
  console.info(ui_1.MESSAGES.PROJECT_INFORMATION_START);
60
61
  console.info();
61
62
  const prompt = inquirer.createPromptModule();
@@ -66,6 +67,11 @@ const askForMissingInformation = (inputs) => __awaiter(void 0, void 0, void 0, f
66
67
  const answers = yield prompt(questions);
67
68
  replaceInputMissingInformation(inputs, answers);
68
69
  }
70
+ const packageManagerInput = getPackageManagerInput(options);
71
+ if (!packageManagerInput.value) {
72
+ const answers = yield askForPackageManager();
73
+ replaceInputMissingInformation(options, answers);
74
+ }
69
75
  });
70
76
  const replaceInputMissingInformation = (inputs, answers) => {
71
77
  return inputs.map((input) => (input.value =
@@ -80,15 +86,14 @@ const generateApplicationFiles = (args, options) => __awaiter(void 0, void 0, vo
80
86
  });
81
87
  const mapSchematicOptions = (options) => {
82
88
  return options.reduce((schematicOptions, option) => {
83
- if (option.name !== 'skip-install' &&
84
- option.value !== 'package-manager') {
89
+ if (option.name !== 'skip-install') {
85
90
  schematicOptions.push(new schematics_1.SchematicOption(option.name, option.value));
86
91
  }
87
92
  return schematicOptions;
88
93
  }, []);
89
94
  };
90
95
  const installPackages = (options, dryRunMode, installDirectory) => __awaiter(void 0, void 0, void 0, function* () {
91
- const inputPackageManager = options.find((option) => option.name === 'package-manager').value;
96
+ const inputPackageManager = getPackageManagerInput(options).value;
92
97
  let packageManager;
93
98
  if (dryRunMode) {
94
99
  console.info();
@@ -96,29 +101,19 @@ const installPackages = (options, dryRunMode, installDirectory) => __awaiter(voi
96
101
  console.info();
97
102
  return;
98
103
  }
99
- if (inputPackageManager !== undefined) {
100
- try {
101
- packageManager = package_managers_1.PackageManagerFactory.create(inputPackageManager);
102
- yield packageManager.install(installDirectory, inputPackageManager);
103
- }
104
- catch (error) {
105
- if (error && error.message) {
106
- console.error(chalk.red(error.message));
107
- }
108
- }
104
+ try {
105
+ packageManager = package_managers_1.PackageManagerFactory.create(inputPackageManager);
106
+ yield packageManager.install(installDirectory, inputPackageManager);
109
107
  }
110
- else {
111
- packageManager = yield selectPackageManager();
112
- yield packageManager.install(installDirectory, packageManager.name.toLowerCase());
108
+ catch (error) {
109
+ if (error && error.message) {
110
+ console.error(chalk.red(error.message));
111
+ }
113
112
  }
114
113
  });
115
- const selectPackageManager = () => __awaiter(void 0, void 0, void 0, function* () {
116
- const answers = yield askForPackageManager();
117
- return package_managers_1.PackageManagerFactory.create(answers['package-manager']);
118
- });
119
114
  const askForPackageManager = () => __awaiter(void 0, void 0, void 0, function* () {
120
115
  const questions = [
121
- (0, questions_1.generateSelect)('package-manager')(ui_1.MESSAGES.PACKAGE_MANAGER_QUESTION)([
116
+ (0, questions_1.generateSelect)('packageManager')(ui_1.MESSAGES.PACKAGE_MANAGER_QUESTION)([
122
117
  package_managers_1.PackageManager.NPM,
123
118
  package_managers_1.PackageManager.YARN,
124
119
  package_managers_1.PackageManager.PNPM,
@@ -19,11 +19,13 @@ class AddCommand extends abstract_command_1.AbstractCommand {
19
19
  .allowUnknownOption()
20
20
  .description('Adds support for an external library to your project.')
21
21
  .option('-d, --dry-run', 'Report actions that would be performed without writing out results.')
22
+ .option('-s, --skip-install', 'Skip package installation.', false)
22
23
  .option('-p, --project [project]', 'Project in which to generate files.')
23
24
  .usage('<library> [options] [library-specific-options]')
24
25
  .action((library, command) => __awaiter(this, void 0, void 0, function* () {
25
26
  const options = [];
26
27
  options.push({ name: 'dry-run', value: !!command.dryRun });
28
+ options.push({ name: 'skip-install', value: command.skipInstall });
27
29
  options.push({
28
30
  name: 'project',
29
31
  value: command.project,
@@ -22,7 +22,7 @@ class NewCommand extends abstract_command_1.AbstractCommand {
22
22
  .option('-d, --dry-run', 'Report actions that would be performed without writing out results.', false)
23
23
  .option('-g, --skip-git', 'Skip git repository initialization.', false)
24
24
  .option('-s, --skip-install', 'Skip package installation.', false)
25
- .option('-p, --package-manager [package-manager]', 'Specify package manager.')
25
+ .option('-p, --package-manager [packageManager]', 'Specify package manager.')
26
26
  .option('-l, --language [language]', 'Programming language to be used (TypeScript or JavaScript)', 'TypeScript')
27
27
  .option('-c, --collection [collectionName]', 'Schematics collection to use', schematics_1.Collection.NESTJS)
28
28
  .option('--strict', 'Enables strict mode in TypeScript.', false)
@@ -35,7 +35,7 @@ class NewCommand extends abstract_command_1.AbstractCommand {
35
35
  options.push({ name: 'skip-install', value: command.skipInstall });
36
36
  options.push({ name: 'strict', value: command.strict });
37
37
  options.push({
38
- name: 'package-manager',
38
+ name: 'packageManager',
39
39
  value: command.packageManager,
40
40
  });
41
41
  options.push({ name: 'collection', value: command.collection });
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.StartCommand = void 0;
13
+ const remaining_flags_1 = require("../lib/utils/remaining-flags");
13
14
  const abstract_command_1 = require("./abstract.command");
14
15
  class StartCommand extends abstract_command_1.AbstractCommand {
15
16
  load(program) {
@@ -67,7 +68,13 @@ class StartCommand extends abstract_command_1.AbstractCommand {
67
68
  });
68
69
  const inputs = [];
69
70
  inputs.push({ name: 'app', value: app });
70
- yield this.action.handle(inputs, options);
71
+ const flags = (0, remaining_flags_1.getRemainingFlags)(program);
72
+ try {
73
+ yield this.action.handle(inputs, options, flags);
74
+ }
75
+ catch (err) {
76
+ process.exit(1);
77
+ }
71
78
  }));
72
79
  }
73
80
  }
@@ -2,13 +2,6 @@ import { Configuration } from '../configuration';
2
2
  export declare class AssetsManager {
3
3
  private watchAssetsKeyValue;
4
4
  private watchers;
5
- private actionInProgress;
6
- /**
7
- * Using on `nest build` to close file watch or the build process will not end
8
- * Interval like process
9
- * If no action has been taken recently close watchers
10
- * If action has been taken recently flag and try again
11
- */
12
5
  closeWatchers(): void;
13
6
  copyAssets(configuration: Required<Configuration>, appName: string, outDir: string, watchAssetsMode: boolean): void;
14
7
  private actionOnFile;
@@ -10,27 +10,9 @@ class AssetsManager {
10
10
  constructor() {
11
11
  this.watchAssetsKeyValue = {};
12
12
  this.watchers = [];
13
- this.actionInProgress = false;
14
13
  }
15
- /**
16
- * Using on `nest build` to close file watch or the build process will not end
17
- * Interval like process
18
- * If no action has been taken recently close watchers
19
- * If action has been taken recently flag and try again
20
- */
21
14
  closeWatchers() {
22
- // Consider adjusting this for larger files
23
- const timeoutMs = 500;
24
- const closeFn = () => {
25
- if (this.actionInProgress) {
26
- this.actionInProgress = false;
27
- setTimeout(closeFn, timeoutMs);
28
- }
29
- else {
30
- this.watchers.forEach((watcher) => watcher.close());
31
- }
32
- };
33
- setTimeout(closeFn, timeoutMs);
15
+ this.watchers.forEach((watcher) => watcher.close());
34
16
  }
35
17
  copyAssets(configuration, appName, outDir, watchAssetsMode) {
36
18
  const assets = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'compilerOptions.assets', appName) || [];
@@ -70,6 +52,9 @@ class AssetsManager {
70
52
  .on('add', (path) => this.actionOnFile(Object.assign(Object.assign({}, option), { path, action: 'change' })))
71
53
  .on('change', (path) => this.actionOnFile(Object.assign(Object.assign({}, option), { path, action: 'change' })))
72
54
  .on('unlink', (path) => this.actionOnFile(Object.assign(Object.assign({}, option), { path, action: 'unlink' })));
55
+ if (!isWatchEnabled) {
56
+ watcher.on('ready', () => watcher.close());
57
+ }
73
58
  this.watchers.push(watcher);
74
59
  }
75
60
  }
@@ -86,8 +71,6 @@ class AssetsManager {
86
71
  }
87
72
  // Set path value to true for watching the first time
88
73
  this.watchAssetsKeyValue[path] = true;
89
- // Set action to true to avoid watches getting cutoff
90
- this.actionInProgress = true;
91
74
  const dest = (0, copy_path_resolve_1.copyPathResolve)(path, item.outDir, sourceRoot.split(path_1.sep).length);
92
75
  // Copy to output dir if file is changed or added
93
76
  if (action === 'change') {
@@ -28,6 +28,7 @@ interface PluginOptions {
28
28
  }
29
29
  interface GenerateOptions {
30
30
  spec?: boolean | Record<string, boolean>;
31
+ flat?: boolean;
31
32
  }
32
33
  export interface ProjectConfiguration {
33
34
  type?: string;
@@ -14,8 +14,8 @@ class PnpmPackageManager extends abstract_package_manager_1.AbstractPackageManag
14
14
  // As of PNPM v5.3, all commands are shared with NPM v6.14.5. See: https://pnpm.js.org/en/pnpm-vs-npm
15
15
  get cli() {
16
16
  return {
17
- install: 'install',
18
- add: 'install',
17
+ install: 'install --strict-peer-dependencies=false',
18
+ add: 'install --strict-peer-dependencies=false',
19
19
  update: 'update',
20
20
  remove: 'uninstall',
21
21
  saveFlag: '--save',
@@ -1,8 +1,11 @@
1
1
  import { Answers } from 'inquirer';
2
+ import { Input } from '../../commands';
2
3
  import { Configuration, ProjectConfiguration } from '../configuration';
3
4
  export declare function shouldAskForProject(schematic: string, configurationProjects: {
4
5
  [key: string]: ProjectConfiguration;
5
6
  }, appName: string): boolean;
6
7
  export declare function shouldGenerateSpec(configuration: Required<Configuration>, schematic: string, appName: string, specValue: boolean, specPassedAsInput?: boolean): any;
8
+ export declare function shouldGenerateFlat(configuration: Required<Configuration>, appName: string, flatValue: boolean): boolean;
7
9
  export declare function askForProjectName(promptQuestion: string, projects: string[]): Promise<Answers>;
8
10
  export declare function moveDefaultProjectToStart(configuration: Configuration, defaultProjectName: string, defaultLabel: string): string[];
11
+ export declare function hasValidOptionFlag(queriedOptionName: string, options: Input[], queriedValue?: string | number | boolean): boolean;
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.moveDefaultProjectToStart = exports.askForProjectName = exports.shouldGenerateSpec = exports.shouldAskForProject = void 0;
12
+ exports.hasValidOptionFlag = exports.moveDefaultProjectToStart = exports.askForProjectName = exports.shouldGenerateFlat = exports.shouldGenerateSpec = exports.shouldAskForProject = void 0;
13
13
  const inquirer = require("inquirer");
14
14
  const get_value_or_default_1 = require("../compiler/helpers/get-value-or-default");
15
15
  const questions_1 = require("../questions/questions");
@@ -48,6 +48,18 @@ function shouldGenerateSpec(configuration, schematic, appName, specValue, specPa
48
48
  return specValue;
49
49
  }
50
50
  exports.shouldGenerateSpec = shouldGenerateSpec;
51
+ function shouldGenerateFlat(configuration, appName, flatValue) {
52
+ // CLI parameters have the highest priority
53
+ if (flatValue === true) {
54
+ return flatValue;
55
+ }
56
+ const flatConfiguration = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'generateOptions.flat', appName || '');
57
+ if (typeof flatConfiguration === 'boolean') {
58
+ return flatConfiguration;
59
+ }
60
+ return flatValue;
61
+ }
62
+ exports.shouldGenerateFlat = shouldGenerateFlat;
51
63
  function askForProjectName(promptQuestion, projects) {
52
64
  return __awaiter(this, void 0, void 0, function* () {
53
65
  const questions = [
@@ -67,3 +79,7 @@ function moveDefaultProjectToStart(configuration, defaultProjectName, defaultLab
67
79
  return projects;
68
80
  }
69
81
  exports.moveDefaultProjectToStart = moveDefaultProjectToStart;
82
+ function hasValidOptionFlag(queriedOptionName, options, queriedValue = true) {
83
+ return options.some((option) => option.name === queriedOptionName && option.value === queriedValue);
84
+ }
85
+ exports.hasValidOptionFlag = hasValidOptionFlag;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/cli",
3
- "version": "9.1.4",
3
+ "version": "9.1.6",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@cli)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -38,15 +38,15 @@
38
38
  },
39
39
  "homepage": "https://github.com/nestjs/nest-cli#readme",
40
40
  "dependencies": {
41
- "@angular-devkit/core": "14.2.2",
42
- "@angular-devkit/schematics": "14.2.2",
43
- "@angular-devkit/schematics-cli": "14.2.2",
41
+ "@angular-devkit/core": "14.2.10",
42
+ "@angular-devkit/schematics": "14.2.10",
43
+ "@angular-devkit/schematics-cli": "14.2.10",
44
44
  "@nestjs/schematics": "^9.0.0",
45
45
  "chalk": "3.0.0",
46
46
  "chokidar": "3.5.3",
47
- "cli-table3": "0.6.2",
47
+ "cli-table3": "0.6.3",
48
48
  "commander": "4.1.1",
49
- "fork-ts-checker-webpack-plugin": "7.2.13",
49
+ "fork-ts-checker-webpack-plugin": "7.2.14",
50
50
  "inquirer": "7.3.3",
51
51
  "node-emoji": "1.11.0",
52
52
  "ora": "5.4.1",
@@ -55,40 +55,40 @@
55
55
  "shelljs": "0.8.5",
56
56
  "source-map-support": "0.5.21",
57
57
  "tree-kill": "1.2.2",
58
- "tsconfig-paths": "4.1.0",
58
+ "tsconfig-paths": "4.1.1",
59
59
  "tsconfig-paths-webpack-plugin": "4.0.0",
60
- "typescript": "4.8.3",
61
- "webpack": "5.74.0",
60
+ "typescript": "4.8.4",
61
+ "webpack": "5.75.0",
62
62
  "webpack-node-externals": "3.0.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@commitlint/cli": "17.1.2",
66
- "@commitlint/config-angular": "17.1.0",
65
+ "@commitlint/cli": "17.3.0",
66
+ "@commitlint/config-angular": "17.3.0",
67
67
  "@types/copyfiles": "2.4.1",
68
- "@types/inquirer": "8.2.3",
69
- "@types/jest": "28.1.8",
70
- "@types/node": "16.11.62",
68
+ "@types/inquirer": "8.2.5",
69
+ "@types/jest": "29.2.4",
70
+ "@types/node": "18.11.18",
71
71
  "@types/node-emoji": "1.8.2",
72
72
  "@types/ora": "3.2.0",
73
73
  "@types/os-name": "3.1.0",
74
74
  "@types/rimraf": "3.0.2",
75
75
  "@types/shelljs": "0.8.11",
76
76
  "@types/webpack-node-externals": "2.5.3",
77
- "@typescript-eslint/eslint-plugin": "5.38.1",
78
- "@typescript-eslint/parser": "5.38.1",
77
+ "@typescript-eslint/eslint-plugin": "5.42.1",
78
+ "@typescript-eslint/parser": "5.42.1",
79
79
  "delete-empty": "3.0.0",
80
- "eslint": "8.24.0",
80
+ "eslint": "8.30.0",
81
81
  "eslint-config-prettier": "8.5.0",
82
82
  "eslint-plugin-import": "2.26.0",
83
83
  "gulp": "4.0.2",
84
84
  "gulp-clean": "0.4.0",
85
- "husky": "8.0.1",
86
- "jest": "28.1.3",
85
+ "husky": "8.0.2",
86
+ "jest": "29.3.1",
87
87
  "lint-staged": "13.0.3",
88
88
  "prettier": "2.7.1",
89
- "release-it": "15.4.2",
90
- "ts-jest": "28.0.8",
91
- "ts-loader": "9.4.1",
89
+ "release-it": "15.5.1",
90
+ "ts-jest": "29.0.3",
91
+ "ts-loader": "9.4.2",
92
92
  "ts-node": "10.9.1"
93
93
  },
94
94
  "lint-staged": {
@@ -2,62 +2,62 @@
2
2
 
3
3
  exports[`tsconfig paths hooks should remove unused imports 1`] = `
4
4
  Map {
5
- "dist/foo.js" => "\\"use strict\\";
6
- Object.defineProperty(exports, \\"__esModule\\", { value: true });
5
+ "dist/foo.js" => ""use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.Foo = void 0;
8
8
  class Foo {
9
9
  }
10
10
  exports.Foo = Foo;
11
11
  ",
12
- "dist/bar.js" => "\\"use strict\\";
13
- Object.defineProperty(exports, \\"__esModule\\", { value: true });
12
+ "dist/bar.js" => ""use strict";
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.Bar = void 0;
15
15
  class Bar {
16
16
  }
17
17
  exports.Bar = Bar;
18
18
  ",
19
- "dist/main.js" => "\\"use strict\\";
20
- Object.defineProperty(exports, \\"__esModule\\", { value: true });
19
+ "dist/main.js" => ""use strict";
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  ",
22
22
  }
23
23
  `;
24
24
 
25
25
  exports[`tsconfig paths hooks should replace path of every import using a path alias by its relative path 1`] = `
26
26
  Map {
27
- "dist/foo.js" => "\\"use strict\\";
28
- Object.defineProperty(exports, \\"__esModule\\", { value: true });
27
+ "dist/foo.js" => ""use strict";
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.Foo = void 0;
30
30
  class Foo {
31
31
  }
32
32
  exports.Foo = Foo;
33
33
  ",
34
- "dist/bar.jsx" => "\\"use strict\\";
35
- Object.defineProperty(exports, \\"__esModule\\", { value: true });
34
+ "dist/bar.jsx" => ""use strict";
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Bar = void 0;
37
37
  class Bar {
38
38
  }
39
39
  exports.Bar = Bar;
40
40
  ",
41
- "dist/baz.js" => "\\"use strict\\";
42
- Object.defineProperty(exports, \\"__esModule\\", { value: true });
41
+ "dist/baz.js" => ""use strict";
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
43
  exports.Baz = void 0;
44
44
  class Baz {
45
45
  }
46
46
  exports.Baz = Baz;
47
47
  ",
48
- "dist/qux.jsx" => "\\"use strict\\";
49
- Object.defineProperty(exports, \\"__esModule\\", { value: true });
48
+ "dist/qux.jsx" => ""use strict";
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
50
  exports.Qux = void 0;
51
51
  class Qux {
52
52
  }
53
53
  exports.Qux = Qux;
54
54
  ",
55
- "dist/main.js" => "\\"use strict\\";
56
- Object.defineProperty(exports, \\"__esModule\\", { value: true });
57
- const foo_1 = require(\\"./foo\\");
58
- const bar_1 = require(\\"./bar\\");
59
- const baz_1 = require(\\"./baz\\");
60
- const qux_1 = require(\\"./qux\\");
55
+ "dist/main.js" => ""use strict";
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ const foo_1 = require("./foo");
58
+ const bar_1 = require("./bar");
59
+ const baz_1 = require("./baz");
60
+ const qux_1 = require("./qux");
61
61
  // use the imports so they do not get eliminated
62
62
  console.log(foo_1.Foo);
63
63
  console.log(bar_1.Bar);