@vltpkg/init 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1 -2
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PackageJson } from '@vltpkg/package-json';
|
|
1
2
|
import type { JSONObj } from '@vltpkg/registry-client';
|
|
2
3
|
import type { NormalizedManifest } from '@vltpkg/types';
|
|
3
4
|
import { getAuthorFromGitUser } from './get-author-from-git-user.ts';
|
|
@@ -6,6 +7,11 @@ export type InitOptions = {
|
|
|
6
7
|
cwd?: string;
|
|
7
8
|
author?: string;
|
|
8
9
|
logger?: (...a: unknown[]) => void;
|
|
10
|
+
/**
|
|
11
|
+
* PackageJson instance to read and write through, so callers that
|
|
12
|
+
* share one (such as the CLI) see the written manifest in its cache.
|
|
13
|
+
*/
|
|
14
|
+
packageJson?: PackageJson;
|
|
9
15
|
};
|
|
10
16
|
export type CustomizableInitOptions = {
|
|
11
17
|
name: string;
|
|
@@ -36,4 +42,4 @@ export declare const ensureGitignore: (cwd: string) => GitignoreFileInfo | undef
|
|
|
36
42
|
* file already contained the entry and no changes were needed.
|
|
37
43
|
*/
|
|
38
44
|
export declare const ensureNpmignore: (cwd: string) => IgnoreFileInfo | undefined;
|
|
39
|
-
export declare const init: ({ cwd, author, logger, }?: InitOptions) => Promise<InitFileResults>;
|
|
45
|
+
export declare const init: ({ cwd, author, logger, packageJson, }?: InitOptions) => Promise<InitFileResults>;
|
package/dist/index.js
CHANGED
|
@@ -57,8 +57,7 @@ export const ensureNpmignore = (cwd) => {
|
|
|
57
57
|
}
|
|
58
58
|
return undefined;
|
|
59
59
|
};
|
|
60
|
-
export const init = async ({ cwd = process.cwd(), author, logger = stderr, } = {}) => {
|
|
61
|
-
const packageJson = new PackageJson();
|
|
60
|
+
export const init = async ({ cwd = process.cwd(), author, logger = stderr, packageJson = new PackageJson(), } = {}) => {
|
|
62
61
|
const path = resolve(cwd, 'package.json');
|
|
63
62
|
let existingData;
|
|
64
63
|
try {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/init",
|
|
3
3
|
"description": "vlt project intialization logic",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"url": "http://vlt.sh"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@vltpkg/git": "1.6.
|
|
17
|
-
"@vltpkg/package-json": "1.6.
|
|
18
|
-
"@vltpkg/registry-client": "1.6.
|
|
19
|
-
"@vltpkg/types": "1.6.
|
|
16
|
+
"@vltpkg/git": "1.6.2",
|
|
17
|
+
"@vltpkg/package-json": "1.6.2",
|
|
18
|
+
"@vltpkg/registry-client": "1.6.2",
|
|
19
|
+
"@vltpkg/types": "1.6.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@eslint/js": "^9.39.1",
|