-
-
Notifications
You must be signed in to change notification settings - Fork 940
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create new @pnpm/catalogs.types package
- Loading branch information
Showing
8 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# @pnpm/catalogs.types | ||
|
||
## 0.1.0 | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @pnpm/catalogs.types | ||
|
||
> Types related to the pnpm catalogs feature. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "@pnpm/catalogs.types", | ||
"version": "0.1.0", | ||
"description": "Types related to the pnpm catalogs feature.", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"engines": { | ||
"node": ">=18.12" | ||
}, | ||
"files": [ | ||
"lib", | ||
"!*.map" | ||
], | ||
"repository": "https://github.com/pnpm/pnpm/blob/main/catalogs/types", | ||
"keywords": [ | ||
"pnpm9", | ||
"pnpm", | ||
"types" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/pnpm/pnpm/issues" | ||
}, | ||
"homepage": "https://github.com/pnpm/pnpm/blob/main/catalogs/types#readme", | ||
"scripts": { | ||
"lint": "eslint \"src/**/*.ts\"", | ||
"compile": "tsc --build && pnpm run lint --fix", | ||
"prepublishOnly": "pnpm run compile", | ||
"test": "pnpm run compile" | ||
}, | ||
"funding": "https://opencollective.com/pnpm", | ||
"exports": { | ||
".": "./lib/index.js" | ||
}, | ||
"devDependencies": { | ||
"@pnpm/catalogs.types": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Catalogs parsed from the pnpm-workspace.yaml file. | ||
* | ||
* https://github.com/pnpm/rfcs/pull/1 | ||
*/ | ||
export interface Catalogs { | ||
/** | ||
* The default catalog. | ||
* | ||
* The default catalog can be defined in 2 ways. | ||
* | ||
* 1. Users can specify a top-level "catalog" field or, | ||
* 2. An explicitly named "default" catalog under the "catalogs" map. | ||
* | ||
* This field contains either definition. Note that it's an error to define | ||
* the default catalog using both options. The parser will fail when reading | ||
* the workspace manifest. | ||
*/ | ||
readonly default?: Catalog | ||
|
||
/** | ||
* Named catalogs. | ||
*/ | ||
readonly [catalogName: string]: Catalog | undefined | ||
} | ||
|
||
export interface Catalog { | ||
readonly [dependencyName: string]: string | undefined | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "@pnpm/tsconfig", | ||
"composite": true, | ||
"compilerOptions": { | ||
"outDir": "lib", | ||
"rootDir": "src" | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"../../__typings__/**/*.d.ts" | ||
], | ||
"references": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": [ | ||
"src/**/*.ts", | ||
"test/**/*.ts", | ||
"../../__typings__/**/*.d.ts" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters