Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: lockfile v4 schema #1182

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 113 additions & 54 deletions schemas/lockfile.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,137 @@
"version": {
"description": "The version of the lockfile.",
"type": "string",
"default": "3",
"default": "4",
"enum": [
"4",
"3"
]
},
"remote": {
"description": "A map of remote URLs to their respective hashes.",
"specifiers": {
"description": "Map of package specifiers to their resolved versions.",
"type": "object",
"default": {},
"additionalProperties": {
"type": "string",
"description": "The hash as the value for the remote URL as the key."
"description": "Key: specifier. Value: version."
}
},
"jsr": {
"type": "object",
"description": "Map of jsr package entries to associated info.",
"default": {},
"additionalProperties": {
"type": "object",
"description": "Info associated with a jsr package.",
"default": {},
"properties": {
"integrity": {
"type": "string",
"description": "Hash for integrity checking."
},
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
}
}
}
},
"npm": {
"type": "object",
"description": "Map of npm package entries to associated info.",
"default": {},
"additionalProperties": {
"type": "object",
"description": "Info associated with a npm package.",
"default": {},
"properties": {
"integrity": {
"type": "string",
"description": "Hash for integrity checking."
},
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
}
}
}
},
"redirects": {
"description": "A map of redirected URLs.",
"description": "Map of redirected URLs.",
"type": "object",
"default": {},
"additionalProperties": {
"type": "string",
"description": "Key: redirected URL. Value: destination."
}
},
"remote": {
"description": "A map of remote URLs to their respective hashes.",
"type": "object",
"default": {},
"additionalProperties": {
"type": "string",
"description": "The redirected specifier as the key and the destination as the value."
"description": "Key: remote URL. Value: hash for integrity checking."
}
},
"workspace": {
"type": "object",
"default": {},
"properties": {
"root": {
"type": "object",
"default": {},
"properties": {
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"packageJson": {
"type": "object",
"default": {},
"properties": {
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
}
}
}
}
},
"members": {
"type": "object",
"default": {},
"additionalProperties": {
"type": "object",
"default": {},
"properties": {
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"packageJson": {
"type": "object",
"default": {},
"properties": {
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
}
}
}
}
}
}
}
},
"packages": {
"$comment": "This is for v3 compatibility.",
"description": "Integrity data for package-managed modules imported under custom schemes.",
"type": "object",
"default": {},
Expand Down Expand Up @@ -96,54 +203,6 @@
}
}
}
},
"workspace": {
"type": "object",
"default": {},
"properties": {
"members": {
"type": "object",
"default": {},
"additionalProperties": {
"type": "object",
"default": {},
"properties": {
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"packageJson": {
"type": "object",
"default": {},
"properties": {
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
}
}
}
}
}
},
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"packageJson": {
"type": "object",
"default": {},
"properties": {
"dependencies": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
}
}
}
}
}
}
}
Loading