@virmator/init 13.0.5 → 13.1.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.
@@ -22,9 +22,3 @@ jobs:
22
22
  uses: softprops/action-gh-release@v2.0.8
23
23
  with:
24
24
  make_latest: true
25
-
26
- - name: latest version
27
- uses: softprops/action-gh-release@v2.0.8
28
- with:
29
- make_latest: false
30
- tag_name: latest
@@ -13,6 +13,9 @@
13
13
  "test:docs": "virmator docs check",
14
14
  "test:update": "npm test update"
15
15
  },
16
+ "engines": {
17
+ "node": ">=22"
18
+ },
16
19
  "publishConfig": {
17
20
  "access": "public"
18
21
  }
@@ -13,6 +13,9 @@
13
13
  "test:coverage": "npm run test coverage",
14
14
  "test:docs": "virmator docs check"
15
15
  },
16
+ "engines": {
17
+ "node": ">=22"
18
+ },
16
19
  "publishConfig": {
17
20
  "access": "public"
18
21
  }
@@ -16,5 +16,8 @@
16
16
  "test:lint": "virmator lint",
17
17
  "test:spelling": "virmator spellcheck",
18
18
  "test:update": "mono-vir for-each-async npm run test:update"
19
+ },
20
+ "engines": {
21
+ "node": ">=22"
19
22
  }
20
23
  }
@@ -20,5 +20,8 @@
20
20
  "test:lint": "virmator lint",
21
21
  "test:spelling": "virmator spellcheck",
22
22
  "test:update": "npm run test update"
23
+ },
24
+ "engines": {
25
+ "node": ">=22"
23
26
  }
24
27
  }
@@ -20,5 +20,8 @@
20
20
  "test:format": "virmator format check",
21
21
  "test:lint": "virmator lint",
22
22
  "test:spelling": "virmator spellcheck"
23
+ },
24
+ "engines": {
25
+ "node": ">=22"
23
26
  }
24
27
  }
package/dist/init.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Tests for this plugin are inside the `virmator` package since a lot of `init`'s functionality is
3
3
  * missed without the other packages.
4
4
  */
5
- import { awaitedBlockingMap, filterObject, getEnumTypedValues, isEnumValue, joinWithFinalConjunction, } from '@augment-vir/common';
5
+ import { awaitedBlockingMap, filterObject, getEnumTypedValues, isEnumValue, joinWithFinalConjunction, pickObjectKeys, } from '@augment-vir/common';
6
6
  import { readPackageJson, writeJson } from '@augment-vir/node-js';
7
7
  import { copyConfigFile, defineVirmatorPlugin, NpmDepType, PackageType, VirmatorEnv, VirmatorNoTraceError, } from '@virmator/core';
8
8
  import { basename, join } from 'node:path';
@@ -308,7 +308,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
308
308
  },
309
309
  },
310
310
  },
311
- }, async ({ cliInputs: { filteredArgs }, package: { cwdPackagePath }, virmator: { allPlugins }, log, runInstallDeps, }) => {
311
+ }, async ({ cliInputs: { filteredArgs }, package: { cwdPackagePath, cwdPackageJson }, virmator: { allPlugins }, log, runInstallDeps, }) => {
312
312
  const packageType = filteredArgs.find((arg) => isEnumValue(arg, PackageType));
313
313
  const packageEnv = filteredArgs.find((arg) => isEnumValue(arg, VirmatorEnv));
314
314
  if (!packageEnv) {
@@ -328,9 +328,9 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
328
328
  await awaitedBlockingMap(relevantConfigs, async (config) => {
329
329
  await copyConfigFile(config, log, true);
330
330
  });
331
- await writePackageJson(cwdPackagePath);
331
+ await writePackageJson(cwdPackageJson, cwdPackagePath);
332
332
  });
333
- async function writePackageJson(packagePath) {
333
+ async function writePackageJson(originalPackageJson, packagePath) {
334
334
  const currentPackageJson = await readPackageJson(packagePath);
335
335
  const git = simpleGit(packagePath);
336
336
  const remotes = await git.getRemotes(true);
@@ -340,6 +340,12 @@ async function writePackageJson(packagePath) {
340
340
  name: basename(packagePath),
341
341
  ...gitProperties,
342
342
  ...currentPackageJson,
343
+ ...pickObjectKeys(originalPackageJson, [
344
+ 'dependencies',
345
+ 'devDependencies',
346
+ 'overrides',
347
+ 'peerDependencies',
348
+ ]),
343
349
  };
344
350
  await writeJson(join(packagePath, 'package.json'), packageJson);
345
351
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virmator/init",
3
- "version": "13.0.5",
3
+ "version": "13.1.0",
4
4
  "description": "Default init plugin for virmator.",
5
5
  "keywords": [
6
6
  "virmator",
@@ -37,7 +37,11 @@
37
37
  "devDependencies": {
38
38
  "@types/node": "^22.1.0",
39
39
  "element-vir": "^22.2.2",
40
- "tsx": "^4.16.5"
40
+ "tsx": "^4.16.5",
41
+ "type-fest": "^4.23.0"
42
+ },
43
+ "engines": {
44
+ "node": ">=22"
41
45
  },
42
46
  "publishConfig": {
43
47
  "access": "public"