isaacscript 6.0.0 → 6.0.2
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/dist/commands/publish/validate.js +3 -12
- package/dist/commands/publish/validate.js.map +1 -1
- package/file-templates/dynamic/package.json +1 -0
- package/file-templates/static/.vscode/extensions.json +1 -1
- package/file-templates/static/.vscode/settings.json +59 -5
- package/file-templates/static/eslint.config.mjs +1 -1
- package/file-templates/static/scripts/lint.ts +2 -2
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
-
import { fatalError, isFile,
|
|
2
|
+
import { fatalError, isFile, isGitDirectoryClean, isGitRepository, } from "complete-node";
|
|
3
3
|
import { CWD, PROJECT_NAME } from "../../constants.js";
|
|
4
4
|
import { execPowershell } from "../../exec.js";
|
|
5
5
|
export async function validate(typeScript, setVersion, verbose) {
|
|
@@ -7,7 +7,7 @@ export async function validate(typeScript, setVersion, verbose) {
|
|
|
7
7
|
if (!isGitRepo) {
|
|
8
8
|
fatalError("Failed to publish since the current working directory is not inside of a git repository.");
|
|
9
9
|
}
|
|
10
|
-
const isClean = await
|
|
10
|
+
const isClean = await isGitDirectoryClean(CWD);
|
|
11
11
|
if (!isClean) {
|
|
12
12
|
fatalError("Failed to publish since the Git repository was dirty. Before publishing, you must push any current changes to git. (Version commits should not contain any code changes.)");
|
|
13
13
|
}
|
|
@@ -18,19 +18,10 @@ export async function validate(typeScript, setVersion, verbose) {
|
|
|
18
18
|
if (setVersion !== undefined && /^\d+\.\d+\.\d+$/.exec(setVersion) === null) {
|
|
19
19
|
fatalError(chalk.red(`The version of "${setVersion}" does not match the semantic versioning format of: #.#.#`));
|
|
20
20
|
}
|
|
21
|
-
if (typeScript) {
|
|
22
|
-
await validateTypeScriptProject();
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
21
|
+
if (!typeScript) {
|
|
25
22
|
validateIsaacScriptMod(verbose);
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
|
-
async function validateTypeScriptProject() {
|
|
29
|
-
const isLoggedIn = await isLoggedInToNPM();
|
|
30
|
-
if (!isLoggedIn) {
|
|
31
|
-
fatalError('Failed to publish since you are not logged in to npm. Try doing "npm login".');
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
25
|
function validateIsaacScriptMod(verbose) {
|
|
35
26
|
validateIsaacScriptOtherCopiesNotRunning(verbose);
|
|
36
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/commands/publish/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/commands/publish/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,MAAM,EACN,mBAAmB,EACnB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,UAAmB,EACnB,UAA8B,EAC9B,OAAgB;IAEhB,MAAM,SAAS,GAAG,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,UAAU,CACR,0FAA0F,CAC3F,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAC/C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,UAAU,CACR,2KAA2K,CAC5K,CAAC;IACJ,CAAC;IAED,MAAM,iBAAiB,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;IACvD,IAAI,C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The TypeScript formatter
|
|
6
5
|
"dbaeumer.vscode-eslint", // The TypeScript linter
|
|
6
|
+
"prettier.prettier-vscode", // The TypeScript formatter
|
|
7
7
|
"streetsidesoftware.code-spell-checker", // A spell-checker extension based on CSpell
|
|
8
8
|
"typescript-to-lua.vscode-typescript-to-lua", // The TypeScriptToLua extension
|
|
9
9
|
"redhat.vscode-xml", // The XML language server
|
|
@@ -43,6 +43,10 @@
|
|
|
43
43
|
// Use Prettier to format "cspell.config.jsonc".
|
|
44
44
|
"cSpell.autoFormatConfigFile": true,
|
|
45
45
|
|
|
46
|
+
// Change all ESLint errors to have yellow squigglies instead of red squigglies.
|
|
47
|
+
// https://www.joshuakgoldberg.com/blog/if-i-wrote-a-linter-part-2-developer-experience/#only-errors
|
|
48
|
+
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
|
|
49
|
+
|
|
46
50
|
// -----------------
|
|
47
51
|
// Language settings
|
|
48
52
|
// -----------------
|
|
@@ -62,16 +66,66 @@
|
|
|
62
66
|
// work similar to other compiled languages like Golang or Rust.
|
|
63
67
|
"typescript.tsserver.experimental.enableProjectDiagnostics": true,
|
|
64
68
|
|
|
65
|
-
// Automatically run the formatter when certain files are saved.
|
|
66
|
-
|
|
69
|
+
// Automatically run the formatter when certain files are saved. We intentionally do not group
|
|
70
|
+
// languages together because of this bug: https://github.com/microsoft/vscode/issues/168411
|
|
71
|
+
"[javascript]": {
|
|
72
|
+
"editor.codeActionsOnSave": {
|
|
73
|
+
"source.fixAll.eslint": "explicit",
|
|
74
|
+
},
|
|
75
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
76
|
+
"editor.formatOnSave": true,
|
|
77
|
+
},
|
|
78
|
+
"[typescript]": {
|
|
79
|
+
"editor.codeActionsOnSave": {
|
|
80
|
+
"source.fixAll.eslint": "explicit",
|
|
81
|
+
},
|
|
82
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
83
|
+
"editor.formatOnSave": true,
|
|
84
|
+
},
|
|
85
|
+
"[javascriptreact]": {
|
|
86
|
+
"editor.codeActionsOnSave": {
|
|
87
|
+
"source.fixAll.eslint": "explicit",
|
|
88
|
+
},
|
|
89
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
90
|
+
"editor.formatOnSave": true,
|
|
91
|
+
},
|
|
92
|
+
"[typescriptreact]": {
|
|
67
93
|
"editor.codeActionsOnSave": {
|
|
68
94
|
"source.fixAll.eslint": "explicit",
|
|
69
95
|
},
|
|
70
|
-
"editor.defaultFormatter": "
|
|
96
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
97
|
+
"editor.formatOnSave": true,
|
|
98
|
+
},
|
|
99
|
+
"[css]": {
|
|
100
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
101
|
+
"editor.formatOnSave": true,
|
|
102
|
+
},
|
|
103
|
+
"[html]": {
|
|
104
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
105
|
+
"editor.formatOnSave": true,
|
|
106
|
+
},
|
|
107
|
+
"[json]": {
|
|
108
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
109
|
+
"editor.formatOnSave": true,
|
|
110
|
+
},
|
|
111
|
+
"[jsonc]": {
|
|
112
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
113
|
+
"editor.formatOnSave": true,
|
|
114
|
+
},
|
|
115
|
+
"[markdown]": {
|
|
116
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
117
|
+
"editor.formatOnSave": true,
|
|
118
|
+
},
|
|
119
|
+
"[postcss]": {
|
|
120
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
121
|
+
"editor.formatOnSave": true,
|
|
122
|
+
},
|
|
123
|
+
"[xml]": {
|
|
124
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
71
125
|
"editor.formatOnSave": true,
|
|
72
126
|
},
|
|
73
|
-
"[
|
|
74
|
-
"editor.defaultFormatter": "
|
|
127
|
+
"[yaml]": {
|
|
128
|
+
"editor.defaultFormatter": "prettier.prettier-vscode",
|
|
75
129
|
"editor.formatOnSave": true,
|
|
76
130
|
},
|
|
77
131
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// @ts-check
|
|
5
5
|
|
|
6
6
|
import { completeConfigBase } from "eslint-config-complete";
|
|
7
|
-
import { isaacScriptModConfigBase } from "eslint-config-isaacscript";
|
|
7
|
+
import { isaacScriptModConfigBase } from "eslint-config-isaacscript";
|
|
8
8
|
import { defineConfig } from "eslint/config";
|
|
9
9
|
|
|
10
10
|
export default defineConfig(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $, commandExists, lintScript } from "complete-node";
|
|
1
|
+
import { $, commandExists, lintScript } from "complete-node";
|
|
2
2
|
|
|
3
3
|
await lintScript(import.meta.dirname, async () => {
|
|
4
4
|
const promises = [
|
|
@@ -28,7 +28,7 @@ await lintScript(import.meta.dirname, async () => {
|
|
|
28
28
|
|
|
29
29
|
const pythonExists = await commandExists("python");
|
|
30
30
|
if (pythonExists) {
|
|
31
|
-
await $`pip install isaac-xml-validator --upgrade --quiet`;
|
|
31
|
+
await $`python -m pip install isaac-xml-validator --upgrade --quiet`;
|
|
32
32
|
promises.push($`isaac-xml-validator --quiet`);
|
|
33
33
|
}
|
|
34
34
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "A command line tool for managing Isaac mods written in TypeScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"build": "tsx ./scripts/build.ts",
|
|
38
38
|
"lint": "tsx ./scripts/lint.ts",
|
|
39
39
|
"start": "tsx ./src/main.ts",
|
|
40
|
-
"test": "
|
|
40
|
+
"test": "tsx --test \"src/**/*.test.ts\""
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@commander-js/extra-typings": "14.0.0",
|
|
44
44
|
"@zamiell/sync-directory": "6.0.5",
|
|
45
45
|
"ajv": "8.17.1",
|
|
46
46
|
"chalk": "5.6.2",
|
|
47
|
-
"commander": "14.0.
|
|
48
|
-
"complete-common": "2.
|
|
49
|
-
"complete-node": "
|
|
47
|
+
"commander": "14.0.2",
|
|
48
|
+
"complete-common": "2.11.0",
|
|
49
|
+
"complete-node": "16.2.0",
|
|
50
50
|
"figlet": "1.9.2-beta.0",
|
|
51
51
|
"jsonc-parser": "3.3.1",
|
|
52
52
|
"klaw-sync": "7.0.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"source-map": "0.7.6",
|
|
56
56
|
"source-map-support": "0.5.21",
|
|
57
57
|
"xml2js": "0.6.2",
|
|
58
|
-
"yaml": "2.8.
|
|
58
|
+
"yaml": "2.8.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/figlet": "1.7.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@types/source-map-support": "0.5.10",
|
|
65
65
|
"@types/xml2js": "0.4.14",
|
|
66
66
|
"ts-json-schema-generator": "2.4.0",
|
|
67
|
-
"typescript-eslint": "8.
|
|
67
|
+
"typescript-eslint": "8.51.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"typescript": ">= 5.0.0",
|