@vscode/vsce 3.4.3-2 → 3.4.3-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/validation.js +8 -8
- package/package.json +2 -2
package/out/validation.js
CHANGED
|
@@ -32,40 +32,40 @@ const parse_semver_1 = __importDefault(require("parse-semver"));
|
|
|
32
32
|
const nameRegex = /^[a-z0-9][a-z0-9\-]*$/i;
|
|
33
33
|
function validatePublisher(publisher) {
|
|
34
34
|
if (!publisher) {
|
|
35
|
-
throw new Error(`Missing publisher
|
|
35
|
+
throw new Error(`Missing extension "publisher": "<ID>" in package.json. Learn more: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#create-a-publisher`);
|
|
36
36
|
}
|
|
37
37
|
if (!nameRegex.test(publisher)) {
|
|
38
|
-
throw new Error(`Invalid publisher
|
|
38
|
+
throw new Error(`Invalid extension "publisher": "${publisher}" in package.json. Expected the identifier of a publisher, not its human-friendly name. Learn more: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#create-a-publisher`);
|
|
39
39
|
}
|
|
40
40
|
return publisher;
|
|
41
41
|
}
|
|
42
42
|
exports.validatePublisher = validatePublisher;
|
|
43
43
|
function validateExtensionName(name) {
|
|
44
44
|
if (!name) {
|
|
45
|
-
throw new Error(`Missing extension name`);
|
|
45
|
+
throw new Error(`Missing extension "name": "<name>" in package.json. Learn more: https://code.visualstudio.com/api/references/extension-manifest`);
|
|
46
46
|
}
|
|
47
47
|
if (!nameRegex.test(name)) {
|
|
48
|
-
throw new Error(`Invalid extension name
|
|
48
|
+
throw new Error(`Invalid extension "name": "${name}" in package.json. Learn more: https://code.visualstudio.com/api/references/extension-manifest`);
|
|
49
49
|
}
|
|
50
50
|
return name;
|
|
51
51
|
}
|
|
52
52
|
exports.validateExtensionName = validateExtensionName;
|
|
53
53
|
function validateVersion(version) {
|
|
54
54
|
if (!version) {
|
|
55
|
-
throw new Error(`Missing extension version`);
|
|
55
|
+
throw new Error(`Missing extension "version": "<version>" in package.json. Learn more: https://code.visualstudio.com/api/references/extension-manifest`);
|
|
56
56
|
}
|
|
57
57
|
if (!semver.valid(version)) {
|
|
58
|
-
throw new Error(`Invalid extension version
|
|
58
|
+
throw new Error(`Invalid extension "version": "${version}" in package.json. Learn more: https://code.visualstudio.com/api/references/extension-manifest`);
|
|
59
59
|
}
|
|
60
60
|
return version;
|
|
61
61
|
}
|
|
62
62
|
exports.validateVersion = validateVersion;
|
|
63
63
|
function validateEngineCompatibility(version) {
|
|
64
64
|
if (!version) {
|
|
65
|
-
throw new Error(`Missing vscode engine compatibility version`);
|
|
65
|
+
throw new Error(`Missing vscode engine compatibility version. ("engines": { "vscode": "<version>" } in package.json) Learn more: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#visual-studio-code-compatibility`);
|
|
66
66
|
}
|
|
67
67
|
if (!/^\*$|^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/.test(version)) {
|
|
68
|
-
throw new Error(`Invalid vscode engine compatibility version '${version}'`);
|
|
68
|
+
throw new Error(`Invalid vscode engine compatibility version '${version}'. ("engines": { "vscode": "${version}" } in package.json) Learn more: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#visual-studio-code-compatibility`);
|
|
69
69
|
}
|
|
70
70
|
return version;
|
|
71
71
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/vsce",
|
|
3
|
-
"version": "3.4.3-
|
|
3
|
+
"version": "3.4.3-4",
|
|
4
4
|
"description": "VS Code Extensions Manager",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@secretlint/secretlint-rule-preset-recommend": "^9.3.2",
|
|
46
46
|
"@vscode/vsce-sign": "^2.0.0",
|
|
47
47
|
"azure-devops-node-api": "^12.5.0",
|
|
48
|
-
"chalk": "^
|
|
48
|
+
"chalk": "^4.1.2",
|
|
49
49
|
"cheerio": "^1.0.0-rc.9",
|
|
50
50
|
"cockatiel": "^3.1.2",
|
|
51
51
|
"commander": "^12.1.0",
|