cspell 8.3.2 → 8.4.0

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/bin.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { program } from 'commander';
2
+ import { program, CommanderError } from 'commander';
3
3
 
4
4
  import * as app from './dist/esm/app.mjs';
5
5
 
6
6
  app.run(program, process.argv).catch((e) => {
7
- if (!(e instanceof program.CommanderError) && !(e instanceof app.CheckFailed)) {
7
+ if (!(e instanceof CommanderError) && !(e instanceof app.CheckFailed)) {
8
8
  console.log(e);
9
9
  // It is possible an explicit exit code was set, use it if it was.
10
10
  process.exitCode = process.exitCode || 1;
@@ -25,7 +25,7 @@ export async function calcCacheSettings(config, cacheOptions, root) {
25
25
  const useCache = cacheOptions.cache ?? cs.useCache ?? false;
26
26
  const cacheLocation = await resolveCacheLocation(path.resolve(root, cacheOptions.cacheLocation ?? cs.cacheLocation ?? DEFAULT_CACHE_LOCATION));
27
27
  const cacheStrategy = cacheOptions.cacheStrategy ?? cs.cacheStrategy ?? 'metadata';
28
- const cacheFormat = cacheOptions.cacheFormat ?? cs.cacheFormat ?? 'legacy';
28
+ const cacheFormat = cacheOptions.cacheFormat ?? cs.cacheFormat ?? 'universal';
29
29
  const optionals = {};
30
30
  if (cacheOptions.cacheReset) {
31
31
  optionals.reset = true;
@@ -25,7 +25,7 @@ export async function calcCacheSettings(config, cacheOptions, root) {
25
25
  const useCache = cacheOptions.cache ?? cs.useCache ?? false;
26
26
  const cacheLocation = await resolveCacheLocation(path.resolve(root, cacheOptions.cacheLocation ?? cs.cacheLocation ?? DEFAULT_CACHE_LOCATION));
27
27
  const cacheStrategy = cacheOptions.cacheStrategy ?? cs.cacheStrategy ?? 'metadata';
28
- const cacheFormat = cacheOptions.cacheFormat ?? cs.cacheFormat ?? 'legacy';
28
+ const cacheFormat = cacheOptions.cacheFormat ?? cs.cacheFormat ?? 'universal';
29
29
  const optionals = {};
30
30
  if (cacheOptions.cacheReset) {
31
31
  optionals.reset = true;
@@ -51,7 +51,7 @@ export function createFromFile(pathToCache, useCheckSum, useRelative) {
51
51
  return cacheWrapper;
52
52
  function resolveFile(cwd, file) {
53
53
  if (!useRelative)
54
- return file;
54
+ return normalizePath(file);
55
55
  const r = path.relative(relDir, path.resolve(cwd, file));
56
56
  return normalizePath(r);
57
57
  }
@@ -72,8 +72,8 @@ export function createFromFile(pathToCache, useCheckSum, useRelative) {
72
72
  }
73
73
  }
74
74
  export function normalizePath(filePath) {
75
- return filePath;
76
- // if (path.sep !== '\\') return filePath;
77
- // return filePath.replace(/\\/g, '/');
75
+ if (path.sep === '/')
76
+ return filePath;
77
+ return filePath.split(path.sep).join('/');
78
78
  }
79
79
  //# sourceMappingURL=fileEntryCache.js.map
@@ -51,7 +51,7 @@ export function createFromFile(pathToCache, useCheckSum, useRelative) {
51
51
  return cacheWrapper;
52
52
  function resolveFile(cwd, file) {
53
53
  if (!useRelative)
54
- return file;
54
+ return normalizePath(file);
55
55
  const r = path.relative(relDir, path.resolve(cwd, file));
56
56
  return normalizePath(r);
57
57
  }
@@ -72,8 +72,8 @@ export function createFromFile(pathToCache, useCheckSum, useRelative) {
72
72
  }
73
73
  }
74
74
  export function normalizePath(filePath) {
75
- return filePath;
76
- // if (path.sep !== '\\') return filePath;
77
- // return filePath.replace(/\\/g, '/');
75
+ if (path.sep === '/')
76
+ return filePath;
77
+ return filePath.split(path.sep).join('/');
78
78
  }
79
79
  //# sourceMappingURL=fileEntryCache.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cspell",
3
- "version": "8.3.2",
3
+ "version": "8.4.0",
4
4
  "description": "A Spelling Checker for Code!",
5
5
  "funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
6
6
  "bin": {
@@ -81,22 +81,22 @@
81
81
  },
82
82
  "homepage": "https://streetsidesoftware.github.io/cspell/",
83
83
  "dependencies": {
84
- "@cspell/cspell-json-reporter": "8.3.2",
85
- "@cspell/cspell-pipe": "8.3.2",
86
- "@cspell/cspell-types": "8.3.2",
87
- "@cspell/dynamic-import": "8.3.2",
84
+ "@cspell/cspell-json-reporter": "8.4.0",
85
+ "@cspell/cspell-pipe": "8.4.0",
86
+ "@cspell/cspell-types": "8.4.0",
87
+ "@cspell/dynamic-import": "8.4.0",
88
88
  "chalk": "^5.3.0",
89
89
  "chalk-template": "^1.1.0",
90
- "commander": "^11.1.0",
91
- "cspell-gitignore": "8.3.2",
92
- "cspell-glob": "8.3.2",
93
- "cspell-io": "8.3.2",
94
- "cspell-lib": "8.3.2",
90
+ "commander": "^12.0.0",
91
+ "cspell-gitignore": "8.4.0",
92
+ "cspell-glob": "8.4.0",
93
+ "cspell-io": "8.4.0",
94
+ "cspell-lib": "8.4.0",
95
95
  "fast-glob": "^3.3.2",
96
96
  "fast-json-stable-stringify": "^2.1.0",
97
97
  "file-entry-cache": "^8.0.0",
98
98
  "get-stdin": "^9.0.0",
99
- "semver": "^7.5.4",
99
+ "semver": "^7.6.0",
100
100
  "strip-ansi": "^7.1.0",
101
101
  "vscode-uri": "^3.0.8"
102
102
  },
@@ -107,9 +107,9 @@
107
107
  "@types/file-entry-cache": "^5.0.4",
108
108
  "@types/glob": "^8.1.0",
109
109
  "@types/micromatch": "^4.0.6",
110
- "@types/semver": "^7.5.6",
110
+ "@types/semver": "^7.5.7",
111
111
  "micromatch": "^4.0.5",
112
112
  "minimatch": "^9.0.3"
113
113
  },
114
- "gitHead": "98f622b2b12529f2d1ccf0f3a57991e4c08b3e3a"
114
+ "gitHead": "f9ad457ca2102c6642c377417a95a4415f5ec3d8"
115
115
  }