isaacscript 2.7.2 → 2.7.3

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.
@@ -9,8 +9,8 @@
9
9
  "editor.tabSize": 2,
10
10
 
11
11
  "files.associations": {
12
- "*.anm2": "xml", // anm2 files are just XML files
13
- "*.dat": "json", // Nearly all mods save JSON to the "save#.dat" file
12
+ "*.anm2": "xml", // anm2 files are just XML files.
13
+ "*.dat": "json", // Nearly all mods save JSON to the "save#.dat" file.
14
14
  },
15
15
 
16
16
  // We want to always use "lf" to be consistent with all platforms.
@@ -27,12 +27,12 @@ fi
27
27
  # We need to move the configuration path temporarily or else the cspell command won't work properly.
28
28
  CSPELL_CONFIG_WORDS=$(cat "$CSPELL_CONFIG_PATH" | python -c "import sys, json; print('\n'.join(json.load(sys.stdin)['words']))")
29
29
  CSPELL_CONFIG_WITHOUT_WORDS=$(cat "$CSPELL_CONFIG_PATH" | python -c "import sys, json; config = json.load(sys.stdin); del config['words']; print(json.dumps(config))")
30
- CSPELL_CONFIG_PATH_TEMP="$REPO_ROOT/cspell-temp.json"
31
- mv "$CSPELL_CONFIG_PATH" "$CSPELL_CONFIG_PATH_TEMP"
30
+ CSPELL_CONFIG_TEMP_PATH="/tmp/cspell-temp.json"
31
+ mv "$CSPELL_CONFIG_PATH" "$CSPELL_CONFIG_TEMP_PATH"
32
32
  echo "$CSPELL_CONFIG_WITHOUT_WORDS" > "$CSPELL_CONFIG_PATH"
33
33
  MISSPELLED_WORDS_PATH="/tmp/misspelled-words.txt"
34
34
  npx cspell lint --no-progress --no-summary --unique --words-only | sort --ignore-case --unique > "$MISSPELLED_WORDS_PATH"
35
- mv "$CSPELL_CONFIG_PATH_TEMP" "$CSPELL_CONFIG_PATH"
35
+ mv "$CSPELL_CONFIG_TEMP_PATH" "$CSPELL_CONFIG_PATH"
36
36
 
37
37
  # Check that each "cspell.json" word is actually being used.
38
38
  echo "Checking for orphaned CSpell configuration words in: $CSPELL_CONFIG_PATH"
@@ -41,7 +41,7 @@ ONE_OR_MORE_FAILURES=0
41
41
  set +e
42
42
  for LINE in $CSPELL_CONFIG_WORDS; do
43
43
  LINE_TRIMMED=$(echo "$LINE" | xargs)
44
- if ! grep "$LINE_TRIMMED" "$MISSPELLED_WORDS_PATH" --ignore-case --quiet; then
44
+ if ! grep -x "$LINE_TRIMMED" "$MISSPELLED_WORDS_PATH" --ignore-case --quiet; then
45
45
  echo "The following word in the CSpell config is not being used: $LINE_TRIMMED"
46
46
  ONE_OR_MORE_FAILURES=1
47
47
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "A command line tool for managing Isaac mods written in TypeScript.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -44,7 +44,7 @@
44
44
  "yaml": "^2.1.1",
45
45
  "yargs": "^17.5.1",
46
46
  "isaac-typescript-definitions": "^3.0.13",
47
- "typescript-to-lua": "^1.6.1"
47
+ "typescript-to-lua": "^1.6.2"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "typescript": ">= 4.0.0"
package/src/configFile.js CHANGED
@@ -10,6 +10,7 @@ const promptSaveSlot_1 = require("./commands/init/promptSaveSlot");
10
10
  const constants_1 = require("./constants");
11
11
  const file = tslib_1.__importStar(require("./file"));
12
12
  const utils_1 = require("./utils");
13
+ const NUM_SPACES = 2;
13
14
  async function get(args) {
14
15
  const verbose = args.verbose === true;
15
16
  const yes = args.yes === true;
@@ -63,7 +64,8 @@ function createObject(modsDirectory, saveSlot) {
63
64
  exports.createObject = createObject;
64
65
  function createFile(projectPath, config, verbose) {
65
66
  const configFilePath = path_1.default.join(projectPath, constants_1.CONFIG_FILE_NAME);
66
- const configContents = JSON.stringify(config, null, 2);
67
+ // Add a newline at the end to satisfy Prettier.
68
+ const configContents = JSON.stringify(config, null, NUM_SPACES).concat("\n");
67
69
  file.write(configFilePath, configContents, verbose);
68
70
  }
69
71
  exports.createFile = createFile;
@@ -1 +1 @@
1
- {"version":3,"file":"configFile.js","sourceRoot":"","sources":["../../../../packages/isaacscript-cli/src/configFile.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,4DAAsC;AACtC,wDAAwB;AACxB,2DAAwD;AACxD,mEAAgE;AAChE,2CAAsE;AACtE,qDAA+B;AAG/B,mCAAgC;AAEzB,KAAK,UAAU,GAAG,CAAC,IAAU;IAClC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC;IAE9B,MAAM,cAAc,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACnD,IAAI,cAAc,KAAK,SAAS,EAAE;QAChC,OAAO,cAAc,CAAC;KACvB;IAED,iFAAiF;IACjF,MAAM,aAAa,GAAG,MAAM,IAAA,uBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,MAAM,IAAA,+BAAc,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,YAAY,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IACrD,UAAU,CAAC,eAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC,OAAO,MAAM,CAAC;AAChB,CAAC;AAhBD,kBAgBC;AAED,SAAS,kBAAkB,CAAC,OAAgB;IAC1C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,4BAAgB,EAAE,OAAO,CAAC,EAAE;QAC3C,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,4BAAgB,EAAE,OAAO,CAAC,CAAC;IACvD,IAAI,MAAc,CAAC;IACnB,IAAI;QACF,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAW,CAAC;KAC3C;IAAC,OAAO,GAAG,EAAE;QACZ,IAAA,aAAK,EAAC,wBAAwB,eAAK,CAAC,KAAK,CAAC,4BAAgB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;KAC5E;IAED,6FAA6F;IAC7F,sCAAsC;IACtC,uEAAuE;IACvE,IAAI,MAAM,CAAC,aAAa,KAAK,SAAS,EAAE;QACtC,YAAY,CACV,eAAe,EACf,6EAA6E,CAC9E,CAAC;KACH;IAED,wFAAwF;IACxF,sCAAsC;IACtC,uEAAuE;IACvE,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE;QACjC,YAAY,CACV,UAAU,EACV,mEAAmE,CACpE,CAAC;KACH;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,KAAa,EAAE,WAAmB;IACtD,IAAA,aAAK,EACH,QAAQ,4BAAgB,wBAAwB,KAAK,YAAY,WAAW,iBAAiB,CAC9F,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAAC,aAAqB,EAAE,QAAgB;IAClE,OAAO;QACL,aAAa;QACb,QAAQ;KACT,CAAC;AACJ,CAAC;AALD,oCAKC;AAED,SAAgB,UAAU,CACxB,WAAmB,EACnB,MAAc,EACd,OAAgB;IAEhB,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,4BAAgB,CAAC,CAAC;IAChE,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvD,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AARD,gCAQC"}
1
+ {"version":3,"file":"configFile.js","sourceRoot":"","sources":["../../../../packages/isaacscript-cli/src/configFile.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,4DAAsC;AACtC,wDAAwB;AACxB,2DAAwD;AACxD,mEAAgE;AAChE,2CAAsE;AACtE,qDAA+B;AAG/B,mCAAgC;AAEhC,MAAM,UAAU,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