@vltpkg/spec 1.0.0-rc.18 → 1.0.0-rc.22

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/package.json CHANGED
@@ -1,65 +1,69 @@
1
1
  {
2
2
  "name": "@vltpkg/spec",
3
3
  "description": "Package specifier library",
4
- "version": "1.0.0-rc.18",
4
+ "version": "1.0.0-rc.22",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/vltpkg/vltpkg.git",
8
8
  "directory": "src/spec"
9
9
  },
10
- "author": "vlt technology inc. <support@vlt.sh> (http://vlt.sh)",
10
+ "author": {
11
+ "name": "vlt technology inc.",
12
+ "email": "support@vlt.sh"
13
+ },
11
14
  "dependencies": {
12
- "@vltpkg/error-cause": "1.0.0-rc.18",
13
- "@vltpkg/semver": "1.0.0-rc.18"
15
+ "@vltpkg/error-cause": "1.0.0-rc.22",
16
+ "@vltpkg/semver": "1.0.0-rc.22"
14
17
  },
15
18
  "devDependencies": {
16
19
  "@eslint/js": "^9.39.1",
17
20
  "@types/node": "^22.19.2",
18
21
  "@types/npm-package-arg": "^6.1.4",
22
+ "@vltpkg/benchmark": "0.0.0",
19
23
  "eslint": "^9.39.1",
20
24
  "npm-package-arg": "^13.0.2",
21
25
  "prettier": "^3.7.4",
22
26
  "tap": "^21.5.0",
23
27
  "typedoc": "~0.27.9",
24
28
  "typescript": "5.7.3",
25
- "typescript-eslint": "^8.49.0",
26
- "@vltpkg/benchmark": "0.0.0"
29
+ "typescript-eslint": "^8.49.0"
27
30
  },
28
31
  "license": "BSD-2-Clause-Patent",
29
32
  "engines": {
30
- "node": ">=22.9.0"
33
+ "node": ">=22.22.0"
34
+ },
35
+ "scripts": {
36
+ "benchmark": "./scripts/benchmark.ts",
37
+ "format": "prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache",
38
+ "format:check": "prettier --check . --ignore-path ../../.prettierignore --cache",
39
+ "lint": "eslint . --fix",
40
+ "lint:check": "eslint .",
41
+ "prepack": "tsc -p tsconfig.publish.json && ../../scripts/update-dist-exports.ts",
42
+ "snap": "tap",
43
+ "test": "tap",
44
+ "posttest": "tsc --noEmit",
45
+ "typecheck": "tsc --noEmit"
31
46
  },
32
47
  "tap": {
33
48
  "extends": "../../tap-config.yaml"
34
49
  },
35
50
  "prettier": "../../.prettierrc.js",
36
- "module": "./dist/index.js",
51
+ "module": "./src/index.ts",
37
52
  "type": "module",
38
53
  "exports": {
39
54
  "./package.json": "./package.json",
40
55
  ".": {
41
56
  "import": {
42
- "default": "./dist/index.js"
57
+ "default": "./src/index.ts"
43
58
  }
44
59
  },
45
60
  "./browser": {
46
61
  "import": {
47
- "default": "./dist/browser.js"
62
+ "default": "./src/browser.ts"
48
63
  }
49
64
  }
50
65
  },
51
66
  "files": [
52
67
  "dist"
53
- ],
54
- "scripts": {
55
- "benchmark": "./scripts/benchmark.ts",
56
- "format": "prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache",
57
- "format:check": "prettier --check . --ignore-path ../../.prettierignore --cache",
58
- "lint": "eslint . --fix",
59
- "lint:check": "eslint .",
60
- "snap": "tap",
61
- "test": "tap",
62
- "posttest": "tsc --noEmit",
63
- "typecheck": "tsc --noEmit"
64
- }
65
- }
68
+ ]
69
+ }
package/dist/browser.d.ts DELETED
@@ -1,131 +0,0 @@
1
- import type { Range } from '@vltpkg/semver';
2
- import type { GitSelectorParsed, Scope, SpecLike, SpecOptions, SpecOptionsFilled, SpecType } from './types.ts';
3
- export * from './types.ts';
4
- export declare const kCustomInspect: unique symbol;
5
- export declare const defaultRegistry = "https://registry.npmjs.org/";
6
- export declare const defaultRegistryName = "npm";
7
- export declare const defaultRegistries: {
8
- npm: string;
9
- gh: string;
10
- };
11
- export declare const defaultJsrRegistries: {
12
- jsr: string;
13
- };
14
- export declare const defaultGitHosts: {
15
- github: string;
16
- bitbucket: string;
17
- gitlab: string;
18
- gist: string;
19
- };
20
- export declare const defaultGitHostArchives: {
21
- github: string;
22
- bitbucket: string;
23
- gist: string;
24
- gitlab: string;
25
- };
26
- /**
27
- * These are just for legacy support of urls that are supported by npm
28
- * and observed in the wild.
29
- *
30
- * Not configurable, because no more will be added. If you wish to define
31
- * custom git hosts, use it with the `'git-hosts'` and `'git-host-archives'`
32
- * options.
33
- */
34
- export declare const gitHostWebsites: {
35
- github: string;
36
- bitbucket: string;
37
- gist: string;
38
- gitlab: string;
39
- };
40
- export declare const defaultScopeRegistries: {
41
- '@jsr': string;
42
- };
43
- export declare const getOptions: (options?: SpecOptions) => SpecOptionsFilled;
44
- /**
45
- * Injects the Node.js dependencies into the Spec class.
46
- */
47
- export type NodeJSDependenciesOptions = {
48
- homedir: typeof import('os').homedir;
49
- isAbsolute: typeof import('node:path').isAbsolute;
50
- join: typeof import('node:path').join;
51
- resolve: typeof import('node:path').resolve;
52
- winPath: typeof import('node:path').win32;
53
- };
54
- export declare const isSpec: (spec: unknown) => spec is Spec;
55
- /**
56
- * Retrieves the short configured name of the default registry if one
57
- * is available.
58
- */
59
- export declare const currentDefaultRegistryName: (registry: string, options: SpecOptions) => string | undefined;
60
- /**
61
- * The base, isomorphic Spec implementation.
62
- */
63
- export declare class Spec implements SpecLike<Spec> {
64
- #private;
65
- /**
66
- * Create a Spec object from a full spec, name+bareSpec, or Spec object
67
- *
68
- * Note: If a Spec object is provided, it is returned as-is, without
69
- * investigating whether the options match.
70
- */
71
- static parse(name: string, bareSpec: string, options?: SpecOptions): Spec;
72
- static parse(spec: string, options?: SpecOptions): Spec;
73
- static parse(spec: Spec, options?: SpecOptions): Spec;
74
- static parseArgs(specOrBareSpec: string, opts?: SpecOptions): Spec;
75
- static nodejsDependencies?: NodeJSDependenciesOptions;
76
- type: SpecType;
77
- spec: string;
78
- options: SpecOptionsFilled;
79
- name: string;
80
- scope?: Scope;
81
- scopeRegistry?: string;
82
- bareSpec: string;
83
- gitRemote?: string;
84
- gitSelector?: string;
85
- gitSelectorParsed?: GitSelectorParsed;
86
- gitCommittish?: string;
87
- namedGitHost?: string;
88
- namedGitHostPath?: string;
89
- workspaceSpec?: string;
90
- workspace?: string;
91
- namedRegistry?: string;
92
- namedJsrRegistry?: string;
93
- registry?: string;
94
- registrySpec?: string;
95
- conventionalRegistryTarball?: string;
96
- semver?: string;
97
- range?: Range;
98
- distTag?: string;
99
- remoteURL?: string;
100
- file?: string;
101
- catalog?: string;
102
- subspec?: Spec;
103
- overridden: boolean;
104
- /**
105
- * Return the final entry in the chain of subspecs
106
- * When deciding which thing to actually fetch, spec.final is the thing
107
- * to look at.
108
- */
109
- get final(): Spec & {
110
- type: Exclude<SpecType, 'catalog'>;
111
- };
112
- /**
113
- * Normally, the string value of a Spec is just the string passed in to
114
- * be parsed. However, in the case of a chain of subspecs, like
115
- * `foo@npm:bar@npm:baz@npm:quux@latest`, this simplifies out the middle
116
- * parts of the chain, returning just `foo@npm:quux@latest`
117
- */
118
- toString(): string;
119
- ['constructor']: typeof Spec;
120
- constructor(name: string, bareSpec: string, options?: SpecOptions);
121
- constructor(spec: string, options?: SpecOptions);
122
- constructor(spec: Spec | string, bareOrOptions?: SpecOptions | string, options?: SpecOptions);
123
- [kCustomInspect](): string;
124
- /**
125
- * Should only ever be called with the bit that comes AFTER the #
126
- * in the git remote url.
127
- */
128
- static parseGitSelector(selector: string, spec?: Spec): [parsed: GitSelectorParsed, committish?: string, range?: Range];
129
- }
130
- export declare const getNormalizeFile: (opts?: NodeJSDependenciesOptions) => (bareSpec: string, spec: Spec) => [path: string, uri: string];
131
- //# sourceMappingURL=browser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C,OAAO,KAAK,EACV,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACT,MAAM,YAAY,CAAA;AACnB,cAAc,YAAY,CAA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