Skip to content

Commit

Permalink
feat: add devEngines (#85)
Browse files Browse the repository at this point in the history
Adds new "devEngines" field to package.json type.

This would wait for this to land in the cli and be released.

npm/cli#7766
  • Loading branch information
reggi authored Oct 7, 2024
1 parent 6d3f319 commit 9780470
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ interface Dist {
unpackedSize?: number
}

interface DevEngineDependency {
name: string
version?: string
onFail?: 'ignore' | 'warn' | 'error' | 'download'
}

interface DevEngines {
os?: DevEngineDependency | DevEngineDependency[]
cpu?: DevEngineDependency | DevEngineDependency[]
libc?: DevEngineDependency | DevEngineDependency[]
runtime?: DevEngineDependency | DevEngineDependency[]
packageManager?: DevEngineDependency | DevEngineDependency[]
}

// this is in the tarball for the project. it really could have anything in it.
export interface PackageJSON {
author?: Contact | string
Expand All @@ -100,6 +114,7 @@ export interface PackageJSON {
dependencies?: Record<string, string>
description?: string
devDependencies?: Record<string, string>
devEngines?: DevEngines
directories?: Record<string, string>
engines?: Record<string, string>
files?: string[]
Expand Down

0 comments on commit 9780470

Please sign in to comment.