📦 VSCode extension manifest type definitions, validators, and utilities.
Installations
npm install vscode-extension-manifest
Developer Guide
Typescript
Yes
Module System
ESM
Min. Node Version
>=18.18.0
Node Version
22.13.0
NPM Version
10.9.2
Score
73.7
Supply Chain
99
Quality
87.9
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Languages
TypeScript (98.96%)
JavaScript (1.04%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
ntnyq
Download Statistics
Total Downloads
705
Last Day
1
Last Week
4
Last Month
105
Last Year
705
GitHub Statistics
MIT License
1 Stars
34 Commits
1 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Feb 18, 2025
Package Meta Information
Latest Version
0.2.0
Package Id
vscode-extension-manifest@0.2.0
Unpacked Size
117.00 kB
Size
24.93 kB
File Count
7
NPM Version
10.9.2
Node Version
22.13.0
Published on
Jan 20, 2025
Total Downloads
Cumulative downloads
Total Downloads
705
Last Day
0%
1
Compared to previous day
Last Week
-60%
4
Compared to previous week
Last Month
-40.7%
105
Compared to previous month
Last Year
0%
705
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
vscode-extension-manifest
VSCode extension manifest type definitions, validators, and utilities.
[!NOTE] This package only provides types for VSCode extension manifest related fields listed in Extension Manifest.
If you need type support for a normal NodeJs package.json file, please check type-fest - package-json.d.ts.
Install
1npm install vscode-extension-manifest -D
1yarn add vscode-extension-manifest -D
1pnpm add vscode-extension-manifest -D
Usage
1import {
2 defineExtensionManifest,
3 readExtensionManifest,
4 readExtensionManifestSync,
5 validateExtensionManifest,
6 writeExtensionManifest,
7 writeExtensionManifestSync,
8} from 'vscode-extension-manifest'
9
10console.log(await readExtensionManifest())
11//=> VSCode extension manifest with types definition
12
13console.log(validateExtensionManifest(readExtensionManifestSync()))
14// => true if valid, false otherwise
15
16const extensionManifest = defineExtensionManifest({
17 name: 'vscode-extension-manifest',
18 version: '1.0.0',
19 publisher: 'ntnyq',
20 engines: {
21 vscode: '^1.96.0',
22 },
23})
24
25await writeExtensionManifest(extensionManifest, {
26 cwd: 'packages/extension',
27})
28
29writeExtensionManifestSync(extensionManifest, {
30 cwd: 'vscode',
31})
API
readExtensionManifest
- Type:
(options?: ReadOptions) => Promise<ExtensionManifest>
Returns a Promise
for VSCode extension manifest with type definition.
ReadOptions
for readExtensionManifest
and readExtensionManifestSync
filename
- Type:
string
- Default:
package.json
- Required:
false
The filename of the extension manifest.
cwd
- Type:
string | URL
- Default:
process.cwd()
- Required:
false
The current working directory.
cache
- Type:
boolean | Map<string, Record<string, any>>
- Default:
undefined
- Required:
false
Specifies whether the read results should be cached. Can be a boolean or a map to hold the cached data.
readExtensionManifestSync
- Type:
(options?: ReadOptions) => ExtensionManifest
Returns VSCode extension manifest with type definition.
ReadOptions
Same as readExtensionManifest
writeExtensionManifest
- Type:
(manifest: ExtensionManifest, options?: WriteOptions) => Promise<void>
WriteOptions
for writeExtensionManifest
and writeExtensionManifestSync
filename
- Type:
string
- Default:
package.json
- Required:
false
The filename of the extension manifest.
cwd
- Type:
string | URL
- Default:
process.cwd()
- Required:
false
The current working directory.
replacer
- Type:
(number | string)[] | null
- Default:
null
- Required:
false
The replacer for JSON.stringify.
space
- Type:
number | string
- Default:
2
- Required:
false
The space for JSON.stringify.
stringify
- Type:
(value: any) => string
- Default:
JSON.stringify
- Required:
false
The stringify function.
writeExtensionManifestSync
- Type:
(manifest: ExtensionManifest, options?: WriteOptions) => void
WriteOptions
Same as writeExtensionManifest
defineExtensionManifest
Define a vscode extension manifest.
Parameters
manifest
- Type:
ExtensionManifest
- Required:
true
The extension manifest.
validateExtensionManifest
- Type:
(manifest: ExtensionManifest) => boolean
Returns true
if the extension manifest is valid, false
otherwise.
By checking the following properties:
publisher
Parameters
manifest
- Type:
ExtensionManifest
- Required:
true
Read by readExtensionManifest
or readExtensionManifestSync
.
Contributes
Find any types definition that are missing or not match.
Please create an issue or pull request.
Links
License

No vulnerabilities found.

No security vulnerabilities found.