fix(deploy): missing imports and license fields (#9199)

This commit is contained in:
btea
2025-03-01 08:39:30 +08:00
committed by GitHub
parent e0918712ae
commit a5e4965c59
3 changed files with 10 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
---
"@pnpm/plugin-commands-deploy": patch
"@pnpm/types": patch
pnpm: patch
---
Fix `pnpm deploy` creating a `package.json` without the `imports` and `license` field [#9193](https://github.com/pnpm/pnpm/issues/9193).

View File

@@ -110,6 +110,7 @@ export interface BaseManifest {
author?: string
license?: string
exports?: Record<string, string>
imports?: Record<string, unknown>
}
export interface DependencyManifest extends BaseManifest {

View File

@@ -35,6 +35,8 @@ const INHERITED_MANIFEST_KEYS = [
'packageManager',
'dependenciesMeta',
'peerDependenciesMeta',
'imports',
'license',
] as const satisfies Array<keyof ProjectManifest>
export type DeployManifest = Pick<ProjectManifest, typeof INHERITED_MANIFEST_KEYS[number] | DependenciesField | 'pnpm'>