@neurodevs/meta-node 0.19.15 → 0.19.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/.vscode/launch.json +53 -58
  2. package/.vscode/settings.json +62 -66
  3. package/.vscode/tasks.json +123 -129
  4. package/README.md +1 -0
  5. package/build/.spruce/settings.json +3 -7
  6. package/build/__tests__/AbstractAutomoduleTest.js +2 -4
  7. package/build/__tests__/AbstractAutomoduleTest.js.map +1 -1
  8. package/build/__tests__/AbstractPackageTest.d.ts +2 -0
  9. package/build/__tests__/AbstractPackageTest.js +4 -1
  10. package/build/__tests__/AbstractPackageTest.js.map +1 -1
  11. package/build/__tests__/impl/GitAutocloner.test.js +0 -3
  12. package/build/__tests__/impl/GitAutocloner.test.js.map +1 -1
  13. package/build/__tests__/impl/GitAutocommit.test.d.ts +2 -2
  14. package/build/__tests__/impl/GitAutocommit.test.js +3 -5
  15. package/build/__tests__/impl/GitAutocommit.test.js.map +1 -1
  16. package/build/__tests__/impl/NpmAutopackage.test.d.ts +18 -4
  17. package/build/__tests__/impl/NpmAutopackage.test.js +228 -26
  18. package/build/__tests__/impl/NpmAutopackage.test.js.map +1 -1
  19. package/build/__tests__/impl/NpmReleasePropagator.test.js +1 -4
  20. package/build/__tests__/impl/NpmReleasePropagator.test.js.map +1 -1
  21. package/build/__tests__/impl/NpmWorkspaceTypeChecker.test.js +0 -3
  22. package/build/__tests__/impl/NpmWorkspaceTypeChecker.test.js.map +1 -1
  23. package/build/impl/NpmAutopackage.d.ts +19 -1
  24. package/build/impl/NpmAutopackage.js +193 -14
  25. package/build/impl/NpmAutopackage.js.map +1 -1
  26. package/eslint.config.js +3 -0
  27. package/package.json +7 -5
  28. package/prettier.config.js +3 -0
  29. package/src/.spruce/settings.json +3 -7
  30. package/src/__tests__/AbstractAutomoduleTest.ts +2 -5
  31. package/src/__tests__/AbstractPackageTest.ts +6 -2
  32. package/src/__tests__/impl/GitAutocloner.test.ts +2 -5
  33. package/src/__tests__/impl/GitAutocommit.test.ts +4 -8
  34. package/src/__tests__/impl/NpmAutopackage.test.ts +291 -24
  35. package/src/__tests__/impl/NpmReleasePropagator.test.ts +3 -6
  36. package/src/__tests__/impl/NpmWorkspaceTypeChecker.test.ts +1 -5
  37. package/src/impl/NpmAutopackage.ts +248 -23
  38. package/tsconfig.json +24 -27
  39. package/eslint.config.mjs +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"GitAutocloner.test.js","sourceRoot":"","sources":["../../../src/__tests__/impl/GitAutocloner.test.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAgB,IAAI,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,EACH,YAAY,EACZ,WAAW,EACX,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,aAGN,MAAM,6BAA6B,CAAA;AACpC,OAAO,mBAAmB,MAAM,2BAA2B,CAAA;AAE3D,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;AAEhC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,mBAAmB;IACnD,MAAM,CAAC,QAAQ,CAAY;IAE3B,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;IACvC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;IAEvC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IACjD,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IAEjD,MAAM,C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AC,mBAAmB,MAAM,CAAA;IACnG,CAAC;IAEO,MAAM,CAAU,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;IAChD,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;IAClD,MAAM,CAAU,mBAAmB,GAAG,uBAAuB,CAAA;IAC7D,MAAM,CAAU,gBAAgB,GAAG,0BAA0B,CAAA;IAE7D,MAAM,CAAC,aAAa;QACxB,OAAO,aAAa,CAAC,MAAM,EAAE,CAAA;IACjC,CAAC;;AAnOsB;IADtB,IAAI,EAAE;+CAGN;AAGsB;IADtB,IAAI,EAAE;uDAWN;AAGsB;IADtB,IAAI,EAAE;4DASN;AAGsB;IADtB,IAAI,EAAE;mDASN;AAGsB;IADtB,IAAI,EAAE;0DAWN;AAGsB;IADtB,IAAI,EAAE;iDAaN;AAGsB;IADtB,IAAI,EAAE;qDAIN;AAGsB;IADtB,IAAI,EAAE;iEASN;AAGsB;IADtB,IAAI,EAAE;kEASN;AAGsB;IADtB,IAAI,EAAE;yDASN;AAGsB;IADtB,IAAI,EAAE;0DASN;AAGsB;IADtB,IAAI,EAAE;oEAUN;AAGsB;IADtB,IAAI,EAAE;qEAUN;AAGsB;IADtB,IAAI,EAAE;mEAYN"}
1
+ {"version":3,"file":"GitAutocloner.test.js","sourceRoot":"","sources":["../../../src/__tests__/impl/GitAutocloner.test.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EACH,YAAY,EACZ,WAAW,EACX,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,aAGN,MAAM,6BAA6B,CAAA;AACpC,OAAO,mBAAmB,MAAM,2BAA2B,CAAA;AAE3D,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,mBAAmB;IACn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,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACtB,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QACnE,CAAC,CAAC,CAAA;IACN,CAAC;IAEO,MAAM,KAAK,qBAAqB;QACpC,OAAO,8BAA8B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,mBAAmB,MAAM,CAAA;IACnG,CAAC;IAEO,MAAM,CAAU,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;IAChD,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;IAClD,MAAM,CAAU,mBAAmB,GAAG,uBAAuB,CAAA;IAC7D,MAAM,CAAU,gBAAgB,GAAG,0BAA0B,CAAA;IAE7D,MAAM,CAAC,aAAa;QACxB,OAAO,aAAa,CAAC,MAAM,EAAE,CAAA;IACjC,CAAC;;AAnOsB;IADtB,IAAI,EAAE;+CAGN;AAGsB;IADtB,IAAI,EAAE;uDAWN;AAGsB;IADtB,IAAI,EAAE;4DASN;AAGsB;IADtB,IAAI,EAAE;mDASN;AAGsB;IADtB,IAAI,EAAE;0DAWN;AAGsB;IADtB,IAAI,EAAE;iDAaN;AAGsB;IADtB,IAAI,EAAE;qDAIN;AAGsB;IADtB,IAAI,EAAE;iEASN;AAGsB;IADtB,IAAI,EAAE;kEASN;AAGsB;IADtB,IAAI,EAAE;yDASN;AAGsB;IADtB,IAAI,EAAE;0DASN;AAGsB;IADtB,IAAI,EAAE;oEAUN;AAGsB;IADtB,IAAI,EAAE;qEAUN;AAGsB;IADtB,IAAI,EAAE;mEAYN"}
@@ -1,5 +1,5 @@
1
- import AbstractModuleTest from '@neurodevs/node-tdd';
2
- export default class GitAutocommitTest extends AbstractModuleTest {
1
+ import AbstractPackageTest from '../AbstractPackageTest.js';
2
+ export default class GitAutocommitTest extends AbstractPackageTest {
3
3
  private static instance;
4
4
  private static readonly commitMessage;
5
5
  private static readonly currentWorkingDir;
@@ -4,13 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { exec as execSync } from 'node:child_process';
8
- import { promisify } from 'node:util';
9
7
  import { callsToExec, fakeExec, resetCallsToExec, } from '@neurodevs/fake-node-core';
10
- import AbstractModuleTest, { test, assert } from '@neurodevs/node-tdd';
8
+ import { test, assert } from '@neurodevs/node-tdd';
11
9
  import GitAutocommit from '../../impl/GitAutocommit.js';
12
- const exec = promisify(execSync);
13
- export default class GitAutocommitTest extends AbstractModuleTest {
10
+ import AbstractPackageTest from '../AbstractPackageTest.js';
11
+ export default class GitAutocommitTest extends AbstractPackageTest {
14
12
  static instance;
15
13
  static commitMessage = this.generateId();
16
14
  static currentWorkingDir = this.generateId();
@@ -1 +1 @@
1
- {"version":3,"file":"GitAutocommit.test.js","sourceRoot":"","sources":["../../../src/__tests__/impl/GitAutocommit.test.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EACH,WAAW,EACX,QAAQ,EACR,gBAAgB,GACnB,MAAM,2BAA2B,CAAA;AAClC,OAAO,kBAAkB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAEtE,OAAO,aAA6B,MAAM,6BAA6B,CAAA;AAEvE,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;AAEhC,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,kBAAkB;IAC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YACD,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,iBAAiB,EAAE,EAAE;SACpE,CAAC,CAAA;IACN,CAAC;IAEO,MAAM,CAAC,WAAW;QACtB,aAAa,CAAC,IAAI,GAAG,QAAuC,CAAA;QAC5D,gBAAgB,EAAE,CAAA;IACtB,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,aAAa,CAC9B,aAAsB,EACtB,UAAmB;QAEnB,OAAO,aAAa,CAAC,MAAM,CACvB,aAAa,IAAI,IAAI,CAAC,aAAa,EACnC,UAAU,IAAI,IAAI,CAAC,iBAAiB,CACvC,CAAA;IACL,CAAC;;AA7BsB;IADtB,IAAI,EAAE;8CAGN;AAGsB;IADtB,IAAI,EAAE;kDAUN"}
@@ -22,20 +22,25 @@ export default class NpmAutopackageTest extends AbstractPackageTest {
22
22
  private static readonly eslintConfigMjsPath;
23
23
  private static readonly eslintConfigJsPath;
24
24
  private static readonly prettierConfigPath;
25
+ private static readonly settingsJsonPath;
25
26
  private static readonly customLib;
26
27
  private static readonly customType;
27
28
  private static readonly customInclude;
28
- private static readonly customOption;
29
+ private static readonly customTsconfigOption;
30
+ private static readonly customJestOption;
31
+ private static readonly customScript;
29
32
  private static readonly setupVscodeCmd;
30
33
  private static readonly checkGenerateIdVersionCmd;
31
34
  private static readonly checkNodeTddVersionCmd;
32
35
  private static readonly checkEslintConfigNdxVersionCmd;
33
36
  private static readonly checkPrettierConfigNdxVersionCmd;
34
37
  private static readonly dependencies;
38
+ private static readonly yarnRemoveDevDepsCommand;
35
39
  private static readonly yarnInstallDevDepsCommand;
36
40
  private static readonly abstractTestFile;
37
41
  private static readonly eslintConfigFile;
38
42
  private static readonly prettierConfigFile;
43
+ private static readonly settingsJsonFile;
39
44
  private static readonly defaultOptions;
40
45
  protected static beforeEach(): Promise<void>;
41
46
  protected static createsInstance(): Promise<void>;
@@ -57,17 +62,23 @@ export default class NpmAutopackageTest extends AbstractPackageTest {
57
62
  protected static thenCommitVscodeChanges(): Promise<void>;
58
63
  protected static thenUpdatesVscodeTasksJson(): Promise<void>;
59
64
  protected static thenCommitsUpdateVscodeTasksJson(): Promise<void>;
65
+ protected static thenRemovesOldDevDependencies(): Promise<void>;
60
66
  protected static thenInstallsDefaultDevDependencies(): Promise<void>;
61
67
  protected static thenCommitsInstallDefaultDevDependencies(): Promise<void>;
62
68
  protected static thenInstallsTestsDirectory(): Promise<void>;
63
69
  protected static thenInstallsAbstractPackageTest(): Promise<void>;
64
70
  protected static thenCommitsInstallAbstractPackageTest(): Promise<void>;
65
- protected static thenDeletesOldEslintConfigMjs(): Promise<void>;
71
+ protected static thenRemovesOldEslintConfigMjs(): Promise<void>;
66
72
  protected static thenInstallsNewEslintConfigJs(): Promise<void>;
67
73
  protected static thenCommitsInstallEslintConfigFile(): Promise<void>;
68
74
  protected static thenInstallsPrettierConfigFile(): Promise<void>;
69
75
  protected static thenCommitsInstallPrettierConfigFile(): Promise<void>;
76
+ protected static thenInstallsSettingsJsonFile(): Promise<void>;
77
+ protected static thenCommitsInstallSettingsJsonFile(): Promise<void>;
70
78
  protected static lastlyOpensVscodeAtEnd(): Promise<void>;
79
+ protected static removesCertainKeysFromPackageJson(): Promise<void>;
80
+ protected static installsEslintConfigIfNotExists(): Promise<void>;
81
+ protected static installsPrettierConfigIfNotExists(): Promise<void>;
71
82
  protected static installsDevDependenciesIfGenerateIdNotLatest(): Promise<void>;
72
83
  protected static installsDevDependenciesIfNodeTddNotLatest(): Promise<void>;
73
84
  protected static installsDevDependenciesIfEslintConfigNdxNotLatest(): Promise<void>;
@@ -89,10 +100,12 @@ export default class NpmAutopackageTest extends AbstractPackageTest {
89
100
  protected static doesNotInstallAbstractPackageTestIfTsExists(): Promise<void>;
90
101
  protected static doesNotInstallAbstractPackageTestIfTsxExists(): Promise<void>;
91
102
  protected static doesNotRemoveEslintConfigMjsIfNotExists(): Promise<void>;
92
- protected static doesNotInstallEslintConfigFileIfExists(): Promise<void>;
93
- protected static doesNotInstallPrettierConfigFileIfExists(): Promise<void>;
103
+ protected static doesNotInstallEslintConfigFileIfContentsEqual(): Promise<void>;
104
+ protected static doesNotInstallPrettierConfigFileIfContentsEqual(): Promise<void>;
105
+ protected static doesNotInstallSettingsJsonFileIfContentsEqual(): Promise<void>;
94
106
  private static run;
95
107
  private static runTwice;
108
+ private static getByPath;
96
109
  private static setShouldInstallDevDeps;
97
110
  private static get scopedPackageName();
98
111
  private static get createModuleCmd();
@@ -108,6 +121,7 @@ export default class NpmAutopackageTest extends AbstractPackageTest {
108
121
  private static get reposUrl();
109
122
  private static get orgsUrl();
110
123
  private static get originalPackageJson();
124
+ private static get originalPackageJsonWithDummies();
111
125
  private static get updatedPackageJson();
112
126
  private static get originalTsconfig();
113
127
  private static get updatedTsconfig();
@@ -4,16 +4,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { exec as execSync } from 'child_process';
8
7
  import path from 'path';
9
- import { promisify } from 'util';
10
- import { callsToExec, callsToFetch, callsToMkdir, callsToReadFile, callsToWriteFile, fakeExec, fakeFetch, fakeMkdir, fakePathExists, fakeReadFile, fakeWriteFile, resetCallsToExec, resetCallsToFetch, resetCallsToMkdir, resetCallsToPathExists, resetCallsToReadFile, resetCallsToWriteFile, setFakeExecResult, setFakeFetchResponse, setFakeReadFileResult, setPathShouldExist, } from '@neurodevs/fake-node-core';
8
+ import { callsToExec, callsToFetch, callsToMkdir, callsToReadFile, callsToWriteFile, fakeExec, fakeFetch, fakeMkdir, fakePathExists, fakeReadFile, fakeWriteFile, resetCallsToExec, resetCallsToFetch, resetCallsToMkdir, resetCallsToPathExists, resetCallsToReadFile, resetCallsToWriteFile, resetFakeReadFileThrowsFor, setFakeExecResult, setFakeFetchResponse, setFakeReadFileResult, setFakeReadFileThrowsFor, setPathShouldExist, } from '@neurodevs/fake-node-core';
11
9
  import { test, assert } from '@neurodevs/node-tdd';
12
10
  import GitAutocommit from '../../impl/GitAutocommit.js';
13
11
  import NpmAutopackage from '../../impl/NpmAutopackage.js';
14
12
  import FakeAutocommit from '../../testDoubles/Autocommit/FakeAutocommit.js';
15
13
  import AbstractPackageTest from '../AbstractPackageTest.js';
16
- const exec = promisify(execSync);
17
14
  export default class NpmAutopackageTest extends AbstractPackageTest {
18
15
  static instance;
19
16
  static installDir = this.generateId();
@@ -37,10 +34,13 @@ export default class NpmAutopackageTest extends AbstractPackageTest {
37
34
  static eslintConfigMjsPath = path.join(this.packageDir, 'eslint.config.mjs');
38
35
  static eslintConfigJsPath = path.join(this.packageDir, 'eslint.config.js');
39
36
  static prettierConfigPath = path.join(this.packageDir, 'prettier.config.js');
37
+ static settingsJsonPath = path.join(this.packageDir, '.vscode', 'settings.json');
40
38
  static customLib = this.generateId();
41
39
  static customType = this.generateId();
42
40
  static customInclude = this.generateId();
43
- static customOption = this.generateId();
41
+ static customTsconfigOption = this.generateId();
42
+ static customJestOption = this.generateId();
43
+ static customScript = this.generateId();
44
44
  static setupVscodeCmd = 'spruce setup.vscode --all true';
45
45
  static checkGenerateIdVersionCmd = `yarn info @neurodevs/generate-id version --silent`;
46
46
  static checkNodeTddVersionCmd = `yarn info @neurodevs/node-tdd version --silent`;
@@ -50,6 +50,7 @@ export default class NpmAutopackageTest extends AbstractPackageTest {
50
50
  [this.generateId()]: this.generateId(),
51
51
  [this.generateId()]: this.generateId(),
52
52
  };
53
+ static yarnRemoveDevDepsCommand = 'yarn remove eslint eslint-config-spruce prettier chokidar-cli ts-node @types/node';
53
54
  static yarnInstallDevDepsCommand = 'yarn add -D @neurodevs/generate-id @neurodevs/node-tdd @neurodevs/eslint-config-ndx @neurodevs/prettier-config-ndx';
54
55
  static abstractTestFile = `import AbstractModuleTest from '@neurodevs/node-tdd'
55
56
 
@@ -66,6 +67,70 @@ export default esConfigNdx
66
67
  static prettierConfigFile = `import prettierConfigNdx from '@neurodevs/prettier-config-ndx'
67
68
 
68
69
  export default prettierConfigNdx
70
+ `;
71
+ static settingsJsonFile = `{
72
+ "debug.node.autoAttach": "on",
73
+ "git.ignoreLimitWarning": true,
74
+ "javascript.validate.enable": false,
75
+ "files.watcherExclude": {
76
+ "**/.git/objects/**": true,
77
+ "**/.git/subtree-cache/**": true,
78
+ "**/build/**": true,
79
+ "**/node_modules/**": true
80
+ },
81
+ "search.exclude": {
82
+ "**/build/**": true,
83
+ "**/node_modules/**": true,
84
+ "**/.next/**": true
85
+ },
86
+ "editor.codeActionsOnSave": {
87
+ "source.fixAll.eslint": "always"
88
+ },
89
+ "editor.formatOnSave": true,
90
+ "editor.formatOnSaveMode": "file",
91
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
92
+ "editor.maxTokenizationLineLength": 20000000,
93
+ "[javascript]": {
94
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
95
+ "editor.formatOnSave": true
96
+ },
97
+ "[javascriptreact]": {
98
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
99
+ "editor.formatOnSave": true
100
+ },
101
+ "[typescript]": {
102
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
103
+ "editor.formatOnSave": true
104
+ },
105
+ "[typescriptreact]": {
106
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
107
+ "editor.formatOnSave": true
108
+ },
109
+ "eslint.enable": true,
110
+ "eslint.useFlatConfig": true,
111
+ "eslint.validate": [
112
+ "javascript",
113
+ "javascriptreact",
114
+ "typescript",
115
+ "typescriptreact"
116
+ ],
117
+ "eslint.workingDirectories": ["./"],
118
+ "debug.javascript.unmapMissingSources": true,
119
+ "javascript.preferences.importModuleSpecifier": "relative",
120
+ "typescript.preferences.importModuleSpecifier": "relative",
121
+ "typescript.tsdk": "node_modules/typescript/lib",
122
+ "typescript.validate.enable": true,
123
+ "cSpell.ignorePaths": [
124
+ "**/package-lock.json",
125
+ "**/node_modules/**",
126
+ "**/build/**",
127
+ "**/vscode-extension/**",
128
+ "**/.git/objects/**",
129
+ ".vscode",
130
+ ".spruce"
131
+ ],
132
+ "cSpell.words": ["arkit", "autogenerated", "scrollable", "serializable"]
133
+ }
69
134
  `;
70
135
  static defaultOptions = {
71
136
  installDir: this.installDir,
@@ -184,7 +249,6 @@ export default prettierConfigNdx
184
249
  'dependencies',
185
250
  'devDependencies',
186
251
  'jest',
187
- 'skill',
188
252
  ]);
189
253
  const expected = {
190
254
  file: this.packageJsonPath,
@@ -265,10 +329,18 @@ export default prettierConfigNdx
265
329
  cwd: this.packageDir,
266
330
  }, 'Did not commit updated vscode tasks.json changes!');
267
331
  }
332
+ static async thenRemovesOldDevDependencies() {
333
+ this.setShouldInstallDevDeps();
334
+ await this.run();
335
+ assert.isEqualDeep(callsToExec[6], {
336
+ command: this.yarnRemoveDevDepsCommand,
337
+ options: { cwd: this.packageDir },
338
+ }, 'Did not remove old devDependencies!');
339
+ }
268
340
  static async thenInstallsDefaultDevDependencies() {
269
341
  this.setShouldInstallDevDeps();
270
342
  await this.run();
271
- assert.isEqualDeep(callsToExec[10], {
343
+ assert.isEqualDeep(callsToExec[11], {
272
344
  command: this.yarnInstallDevDepsCommand,
273
345
  options: { cwd: this.packageDir },
274
346
  }, 'Did not install default devDependencies!');
@@ -305,14 +377,14 @@ export default prettierConfigNdx
305
377
  cwd: this.packageDir,
306
378
  }, 'Did not commit install AbstractPackageTest changes!');
307
379
  }
308
- static async thenDeletesOldEslintConfigMjs() {
380
+ static async thenRemovesOldEslintConfigMjs() {
309
381
  setPathShouldExist(path.join(this.packageDir, 'eslint.config.mjs'), true);
310
382
  this.setShouldInstallDevDeps();
311
383
  await this.run();
312
- assert.isEqualDeep(callsToExec[11], {
384
+ assert.isEqualDeep(callsToExec[12], {
313
385
  command: `git rm eslint.config.mjs`,
314
386
  options: { cwd: this.packageDir },
315
- }, 'Did not delete old eslint.config.mjs!');
387
+ }, 'Did not remove old eslint.config.mjs!');
316
388
  }
317
389
  static async thenInstallsNewEslintConfigJs() {
318
390
  this.setShouldInstallDevDeps();
@@ -348,9 +420,55 @@ export default prettierConfigNdx
348
420
  cwd: this.packageDir,
349
421
  }, 'Did not commit install prettier.config.js changes!');
350
422
  }
423
+ static async thenInstallsSettingsJsonFile() {
424
+ this.setShouldInstallDevDeps();
425
+ await this.run();
426
+ assert.isEqualDeep(callsToWriteFile[7], {
427
+ file: this.settingsJsonPath,
428
+ data: this.settingsJsonFile,
429
+ options: { encoding: 'utf-8' },
430
+ }, 'Did not install settings.json!');
431
+ }
432
+ static async thenCommitsInstallSettingsJsonFile() {
433
+ this.setShouldInstallDevDeps();
434
+ await this.run();
435
+ assert.isEqualDeep(FakeAutocommit.callsToConstructor[10], {
436
+ commitMessage: `patch: install settings.json (@neurodevs/meta-node: ${this.metaNodeVersion})`,
437
+ cwd: this.packageDir,
438
+ }, 'Did not commit install settings.json changes!');
439
+ }
351
440
  static async lastlyOpensVscodeAtEnd() {
352
441
  await this.run();
353
- assert.isEqualDeep(callsToExec[11], { command: 'code .', options: { cwd: this.packageDir } }, 'Did not open vscode at end!');
442
+ assert.isEqualDeep(callsToExec[12], { command: 'code .', options: { cwd: this.packageDir } }, 'Did not open vscode at end!');
443
+ }
444
+ static async removesCertainKeysFromPackageJson() {
445
+ const keysToRemove = [
446
+ 'skill',
447
+ 'jest.testPathIgnorePatterns',
448
+ 'jest.moduleNameMapper',
449
+ 'scripts.build.resolve-paths',
450
+ 'scripts.lint.tsc',
451
+ 'scripts.post.watch.build',
452
+ 'scripts.resolve-paths.lint',
453
+ 'scripts.watch.rebuild',
454
+ 'scripts.watch.tsc',
455
+ ];
456
+ const pkg = JSON.parse(this.updatedPackageJson);
457
+ for (const key of keysToRemove) {
458
+ assert.isUndefined(this.getByPath(pkg, key), `Did not remove ${key} from package.json!`);
459
+ }
460
+ }
461
+ static async installsEslintConfigIfNotExists() {
462
+ setFakeReadFileThrowsFor(this.eslintConfigJsPath);
463
+ await this.run();
464
+ const calls = callsToWriteFile.filter((call) => call.file === this.eslintConfigJsPath);
465
+ assert.isEqual(calls.length, 1, 'Should install eslint.config.js if it does not exist!');
466
+ }
467
+ static async installsPrettierConfigIfNotExists() {
468
+ setFakeReadFileThrowsFor(this.prettierConfigPath);
469
+ await this.run();
470
+ const calls = callsToWriteFile.filter((call) => call.file === this.prettierConfigPath);
471
+ assert.isEqual(calls.length, 1, 'Should install prettier.config.js if it does not exist!');
354
472
  }
355
473
  static async installsDevDependenciesIfGenerateIdNotLatest() {
356
474
  setFakeExecResult(this.checkGenerateIdVersionCmd, {
@@ -458,7 +576,7 @@ export default prettierConfigNdx
458
576
  assert.isFalse(callsToExec.some((call) => call?.command === 'code .'), 'Should not open vscode if not cloned!');
459
577
  }
460
578
  static async doesNotThrowIfGenerateIdNotInPackageJson() {
461
- setFakeReadFileResult(this.packageJsonPath, this.originalPackageJson.replace('@neurodevs/generate-id', ''));
579
+ setFakeReadFileResult(this.packageJsonPath, JSON.stringify(this.originalPackageJson).replace('@neurodevs/generate-id', ''));
462
580
  await this.runTwice();
463
581
  }
464
582
  static async doesNotInstallAbstractPackageTestIfTsExists() {
@@ -479,17 +597,23 @@ export default prettierConfigNdx
479
597
  const calls = callsToExec.filter((call) => call?.command === `git rm eslint.config.mjs`);
480
598
  assert.isEqual(calls.length, 0, 'Should not remove eslint.config.mjs if it does not exist!');
481
599
  }
482
- static async doesNotInstallEslintConfigFileIfExists() {
483
- setPathShouldExist(this.eslintConfigJsPath, true);
600
+ static async doesNotInstallEslintConfigFileIfContentsEqual() {
601
+ setFakeReadFileResult(this.eslintConfigJsPath, this.eslintConfigFile);
484
602
  await this.run();
485
603
  const calls = callsToWriteFile.filter((call) => call.file === this.eslintConfigJsPath);
486
- assert.isEqual(calls.length, 0, 'Should not install eslint.config.js if already exists!');
604
+ assert.isEqual(calls.length, 0, 'Should not install eslint.config.js if contents are equal!');
487
605
  }
488
- static async doesNotInstallPrettierConfigFileIfExists() {
489
- setPathShouldExist(this.prettierConfigPath, true);
606
+ static async doesNotInstallPrettierConfigFileIfContentsEqual() {
607
+ setFakeReadFileResult(this.prettierConfigPath, this.prettierConfigFile);
490
608
  await this.run();
491
609
  const calls = callsToWriteFile.filter((call) => call.file === this.prettierConfigPath);
492
- assert.isEqual(calls.length, 0, 'Should not install prettier.config.js if already exists!');
610
+ assert.isEqual(calls.length, 0, 'Should not install prettier.config.js if contents are equal!');
611
+ }
612
+ static async doesNotInstallSettingsJsonFileIfContentsEqual() {
613
+ setFakeReadFileResult(this.settingsJsonPath, this.settingsJsonFile);
614
+ await this.run();
615
+ const calls = callsToWriteFile.filter((call) => call.file === this.settingsJsonPath);
616
+ assert.isEqual(calls.length, 0, 'Should not install settings.json if contents are equal!');
493
617
  }
494
618
  static async run() {
495
619
  await this.instance.run();
@@ -511,6 +635,11 @@ export default prettierConfigNdx
511
635
  setFakeFetchResponse(this.reposUrl, fakeResponse);
512
636
  await this.run();
513
637
  }
638
+ static getByPath(obj, path) {
639
+ return path
640
+ .split('.')
641
+ .reduce((acc, key) => (acc == null ? undefined : acc[key]), obj);
642
+ }
514
643
  static setShouldInstallDevDeps() {
515
644
  setFakeExecResult(this.checkGenerateIdVersionCmd, {
516
645
  stdout: '0.0.1',
@@ -573,10 +702,11 @@ export default prettierConfigNdx
573
702
  static fakeReadFile() {
574
703
  NpmAutopackage.readFile = fakeReadFile;
575
704
  resetCallsToReadFile();
576
- setFakeReadFileResult(this.packageJsonPath, this.originalPackageJson);
705
+ setFakeReadFileResult(this.packageJsonPath, JSON.stringify(this.originalPackageJsonWithDummies));
577
706
  setFakeReadFileResult(this.tasksJsonPath, JSON.stringify(this.originalTasksJson));
578
707
  setFakeReadFileResult(this.tsconfigPath, JSON.stringify(this.originalTsconfig));
579
708
  setFakeReadFileResult(this.gitignorePath, this.originalGitignore);
709
+ resetFakeReadFileThrowsFor();
580
710
  }
581
711
  static fakeWriteFile() {
582
712
  NpmAutopackage.writeFile = fakeWriteFile;
@@ -600,9 +730,12 @@ export default prettierConfigNdx
600
730
  return `https://api.github.com/orgs/${this.gitNamespace}/repos`;
601
731
  }
602
732
  static get originalPackageJson() {
603
- return JSON.stringify({
733
+ return {
604
734
  name: this.packageName,
605
735
  description: 'Old description',
736
+ scripts: {
737
+ customScript: this.customScript,
738
+ },
606
739
  dependencies: this.dependencies,
607
740
  devDependencies: {
608
741
  '@neurodevs/generate-id': '^1.0.0',
@@ -610,11 +743,34 @@ export default prettierConfigNdx
610
743
  '@neurodevs/eslint-config-ndx': '^1.0.0',
611
744
  '@neurodevs/prettier-config-ndx': '^1.0.0',
612
745
  },
613
- });
746
+ jest: {
747
+ ['customOption']: this.customJestOption,
748
+ },
749
+ };
750
+ }
751
+ static get originalPackageJsonWithDummies() {
752
+ return {
753
+ ...this.originalPackageJson,
754
+ scripts: {
755
+ ...this.originalPackageJson.scripts,
756
+ 'build.resolve-paths': 'dummy',
757
+ 'lint.tsc': 'dummy',
758
+ 'post.watch.build': 'dummy',
759
+ 'resolve-paths.lint': 'dummy',
760
+ 'watch.rebuild': 'dummy',
761
+ 'watch.tsc': 'dummy',
762
+ },
763
+ jest: {
764
+ ...this.originalPackageJson.jest,
765
+ testPathIgnorePatterns: 'dummy',
766
+ moduleNameMapper: 'dummy',
767
+ },
768
+ skill: 'dummy',
769
+ };
614
770
  }
615
771
  static get updatedPackageJson() {
616
772
  return JSON.stringify({
617
- ...JSON.parse(this.originalPackageJson),
773
+ ...this.originalPackageJson,
618
774
  name: this.scopedPackageName,
619
775
  description: this.description,
620
776
  type: 'module',
@@ -630,7 +786,32 @@ export default prettierConfigNdx
630
786
  bugs: {
631
787
  url: `https://github.com/${this.gitNamespace}/${this.packageName}/issues`,
632
788
  },
789
+ scripts: {
790
+ ...this.originalPackageJson.scripts,
791
+ 'build.ci': 'yarn run build.tsc && yarn run lint',
792
+ 'build.dev': 'yarn run build.tsc --sourceMap ; yarn run lint ; prettier --write .',
793
+ 'build.copy-files': "mkdir -p build && rsync -avzq --exclude='*.ts' ./src/ ./build/",
794
+ 'build.tsc': 'yarn run build.copy-files && tsc',
795
+ clean: 'yarn run clean.build',
796
+ 'clean.all': 'yarn run clean.dependencies && yarn run clean.build',
797
+ 'clean.build': 'rm -rf build/',
798
+ 'clean.dependencies': 'rm -rf node_modules/ package-lock.json yarn.lock',
799
+ 'fix.lint': "eslint --fix --cache '**/*.ts'",
800
+ lint: "eslint --cache '**/*.ts'",
801
+ rebuild: 'yarn run clean.all && yarn install && yarn run build.dev',
802
+ 'update.dependencies': 'yarn run clean.dependencies && yarn',
803
+ test: 'NODE_OPTIONS=--experimental-vm-modules jest',
804
+ 'watch.build.dev': "tsc-watch --sourceMap --onCompilationComplete 'yarn run build.copy-files'",
805
+ },
633
806
  dependencies: this.dependencies,
807
+ jest: {
808
+ ...this.originalPackageJson.jest,
809
+ testEnvironment: 'node',
810
+ testRunner: 'jest-circus/runner',
811
+ testMatch: ['<rootDir>/build/__tests__/**/*.test.js?(x)'],
812
+ testTimeout: 5000,
813
+ maxWorkers: 4,
814
+ },
634
815
  });
635
816
  }
636
817
  static get originalTsconfig() {
@@ -640,7 +821,7 @@ export default prettierConfigNdx
640
821
  types: [this.customType],
641
822
  },
642
823
  include: [this.customInclude],
643
- customOption: this.customOption,
824
+ customOption: this.customTsconfigOption,
644
825
  };
645
826
  }
646
827
  static get updatedTsconfig() {
@@ -774,6 +955,9 @@ __decorate([
774
955
  __decorate([
775
956
  test()
776
957
  ], NpmAutopackageTest, "thenCommitsUpdateVscodeTasksJson", null);
958
+ __decorate([
959
+ test()
960
+ ], NpmAutopackageTest, "thenRemovesOldDevDependencies", null);
777
961
  __decorate([
778
962
  test()
779
963
  ], NpmAutopackageTest, "thenInstallsDefaultDevDependencies", null);
@@ -791,7 +975,7 @@ __decorate([
791
975
  ], NpmAutopackageTest, "thenCommitsInstallAbstractPackageTest", null);
792
976
  __decorate([
793
977
  test()
794
- ], NpmAutopackageTest, "thenDeletesOldEslintConfigMjs", null);
978
+ ], NpmAutopackageTest, "thenRemovesOldEslintConfigMjs", null);
795
979
  __decorate([
796
980
  test()
797
981
  ], NpmAutopackageTest, "thenInstallsNewEslintConfigJs", null);
@@ -804,9 +988,24 @@ __decorate([
804
988
  __decorate([
805
989
  test()
806
990
  ], NpmAutopackageTest, "thenCommitsInstallPrettierConfigFile", null);
991
+ __decorate([
992
+ test()
993
+ ], NpmAutopackageTest, "thenInstallsSettingsJsonFile", null);
994
+ __decorate([
995
+ test()
996
+ ], NpmAutopackageTest, "thenCommitsInstallSettingsJsonFile", null);
807
997
  __decorate([
808
998
  test()
809
999
  ], NpmAutopackageTest, "lastlyOpensVscodeAtEnd", null);
1000
+ __decorate([
1001
+ test()
1002
+ ], NpmAutopackageTest, "removesCertainKeysFromPackageJson", null);
1003
+ __decorate([
1004
+ test()
1005
+ ], NpmAutopackageTest, "installsEslintConfigIfNotExists", null);
1006
+ __decorate([
1007
+ test()
1008
+ ], NpmAutopackageTest, "installsPrettierConfigIfNotExists", null);
810
1009
  __decorate([
811
1010
  test()
812
1011
  ], NpmAutopackageTest, "installsDevDependenciesIfGenerateIdNotLatest", null);
@@ -872,8 +1071,11 @@ __decorate([
872
1071
  ], NpmAutopackageTest, "doesNotRemoveEslintConfigMjsIfNotExists", null);
873
1072
  __decorate([
874
1073
  test()
875
- ], NpmAutopackageTest, "doesNotInstallEslintConfigFileIfExists", null);
1074
+ ], NpmAutopackageTest, "doesNotInstallEslintConfigFileIfContentsEqual", null);
1075
+ __decorate([
1076
+ test()
1077
+ ], NpmAutopackageTest, "doesNotInstallPrettierConfigFileIfContentsEqual", null);
876
1078
  __decorate([
877
1079
  test()
878
- ], NpmAutopackageTest, "doesNotInstallPrettierConfigFileIfExists", null);
1080
+ ], NpmAutopackageTest, "doesNotInstallSettingsJsonFileIfContentsEqual", null);
879
1081
  //# sourceMappingURL=NpmAutopackage.test.js.map