@cspell/cspell-tools 6.18.1 → 6.19.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.
@@ -1,3 +1,3 @@
1
- import { FeatureFlags } from './FeatureFlags';
1
+ import type { FeatureFlags } from './FeatureFlags';
2
2
  export declare function parseFlags(ff: FeatureFlags, flags: string[]): FeatureFlags;
3
3
  //# sourceMappingURL=parseFlags.d.ts.map
package/dist/app.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as program from 'commander';
2
- import { FeatureFlags } from './FeatureFlags';
1
+ import type * as program from 'commander';
2
+ import type { FeatureFlags } from './FeatureFlags';
3
3
  export declare function run(program: program.Command, argv: string[], flags?: FeatureFlags): Promise<void>;
4
4
  //# sourceMappingURL=app.d.ts.map
package/dist/app.js CHANGED
@@ -26,10 +26,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
27
  exports.run = void 0;
28
28
  const path = __importStar(require("path"));
29
+ const build_1 = require("./build");
30
+ const compile_1 = require("./compile");
29
31
  const compiler = __importStar(require("./compiler"));
30
32
  const logWithTimestamp_1 = require("./compiler/logWithTimestamp");
31
- const compile_1 = require("./compile");
32
- const build_1 = require("./build");
33
33
  // eslint-disable-next-line @typescript-eslint/no-var-requires
34
34
  const npmPackage = require(path.join(__dirname, '..', 'package.json'));
35
35
  compiler.setLogger(logWithTimestamp_1.logWithTimestamp);
package/dist/build.js CHANGED
@@ -25,9 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.build = void 0;
27
27
  const cosmiconfig_1 = require("cosmiconfig");
28
+ const path = __importStar(require("path"));
28
29
  const compiler_1 = require("./compiler");
29
30
  const config_1 = require("./config");
30
- const path = __importStar(require("path"));
31
31
  const moduleName = 'cspell-tools';
32
32
  const searchPlaces = [
33
33
  `${moduleName}.config.json`,
package/dist/compile.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CompileCommonAppOptions } from './AppOptions';
2
- import { FeatureFlags } from './FeatureFlags';
1
+ import type { CompileCommonAppOptions } from './AppOptions';
2
+ import type { FeatureFlags } from './FeatureFlags';
3
3
  export declare function processCompileAction(src: string[], options: CompileCommonAppOptions, featureFlags: FeatureFlags | undefined): Promise<void>;
4
4
  //# sourceMappingURL=compile.d.ts.map
package/dist/compile.js CHANGED
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.processCompileAction = void 0;
4
4
  const sync_1 = require("@cspell/cspell-pipe/sync");
5
- const FeatureFlags_1 = require("./FeatureFlags");
6
5
  const compile_1 = require("./compiler/compile");
7
6
  const createCompileRequest_1 = require("./compiler/createCompileRequest");
8
7
  const globP_1 = require("./compiler/globP");
8
+ const FeatureFlags_1 = require("./FeatureFlags");
9
9
  (0, FeatureFlags_1.getSystemFeatureFlags)().register('compound', 'Enable compound dictionary sources.');
10
10
  async function processCompileAction(src, options, featureFlags) {
11
11
  const ff = featureFlags || (0, FeatureFlags_1.getSystemFeatureFlags)();
@@ -1,4 +1,4 @@
1
- import { CompileRequest, CompileSourceOptions, Target } from '../config';
1
+ import type { CompileRequest, CompileSourceOptions, Target } from '../config';
2
2
  interface CompileOptions {
3
3
  /**
4
4
  * Optional filter function to filter targets.
@@ -1,4 +1,4 @@
1
- import { CompileCommonAppOptions } from '../AppOptions';
2
- import { CompileRequest } from '../config';
1
+ import type { CompileCommonAppOptions } from '../AppOptions';
2
+ import type { CompileRequest } from '../config';
3
3
  export declare function createCompileRequest(sources: string[], options: CompileCommonAppOptions): CompileRequest;
4
4
  //# sourceMappingURL=createCompileRequest.d.ts.map
@@ -1,5 +1,5 @@
1
- export { compileWordList, compileTrie } from './wordListCompiler';
2
- export { type Logger, setLogger } from './logger';
3
- export { compile, compileTarget } from './compile';
4
1
  export type { CompileRequest, CompileTargetOptions, RunConfig } from '../config';
2
+ export { compile, compileTarget } from './compile';
3
+ export { type Logger, setLogger } from './logger';
4
+ export { compileTrie, compileWordList } from './wordListCompiler';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.compileTarget = exports.compile = exports.setLogger = exports.compileTrie = exports.compileWordList = void 0;
4
- var wordListCompiler_1 = require("./wordListCompiler");
5
- Object.defineProperty(exports, "compileWordList", { enumerable: true, get: function () { return wordListCompiler_1.compileWordList; } });
6
- Object.defineProperty(exports, "compileTrie", { enumerable: true, get: function () { return wordListCompiler_1.compileTrie; } });
7
- var logger_1 = require("./logger");
8
- Object.defineProperty(exports, "setLogger", { enumerable: true, get: function () { return logger_1.setLogger; } });
3
+ exports.compileWordList = exports.compileTrie = exports.setLogger = exports.compileTarget = exports.compile = void 0;
9
4
  var compile_1 = require("./compile");
10
5
  Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return compile_1.compile; } });
11
6
  Object.defineProperty(exports, "compileTarget", { enumerable: true, get: function () { return compile_1.compileTarget; } });
7
+ var logger_1 = require("./logger");
8
+ Object.defineProperty(exports, "setLogger", { enumerable: true, get: function () { return logger_1.setLogger; } });
9
+ var wordListCompiler_1 = require("./wordListCompiler");
10
+ Object.defineProperty(exports, "compileTrie", { enumerable: true, get: function () { return wordListCompiler_1.compileTrie; } });
11
+ Object.defineProperty(exports, "compileWordList", { enumerable: true, get: function () { return wordListCompiler_1.compileWordList; } });
12
12
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- import { ReaderOptions } from './Reader';
1
+ import type { ReaderOptions } from './Reader';
2
2
  export declare function streamWordsFromFile(filename: string, options: ReaderOptions): Promise<Iterable<string>>;
3
3
  //# sourceMappingURL=iterateWordsFromFile.d.ts.map
@@ -1,3 +1,3 @@
1
- import { Logger } from '.';
1
+ import type { Logger } from './logger';
2
2
  export declare const logWithTimestamp: Logger;
3
3
  //# sourceMappingURL=logWithTimestamp.d.ts.map
@@ -1,4 +1,4 @@
1
- import { CompileOptions } from './CompileOptions';
1
+ import type { CompileOptions } from './CompileOptions';
2
2
  export declare function compileWordList(lines: Iterable<string>, destFilename: string, options: CompileOptions): Promise<void>;
3
3
  export interface TrieOptions {
4
4
  base?: number;
@@ -26,11 +26,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.__testing__ = exports.compileTrie = exports.compileWordList = void 0;
27
27
  const sync_1 = require("@cspell/cspell-pipe/sync");
28
28
  const Trie = __importStar(require("cspell-trie-lib"));
29
- const fs_extra_1 = require("fs-extra");
29
+ const promises_1 = require("fs/promises");
30
30
  const path = __importStar(require("path"));
31
31
  const fileWriter_1 = require("./fileWriter");
32
32
  const logger_1 = require("./logger");
33
33
  const wordListParser_1 = require("./wordListParser");
34
+ const mkdirp = async (p) => {
35
+ await (0, promises_1.mkdir)(p, { recursive: true });
36
+ };
34
37
  // Indicate that a word list has already been processed.
35
38
  const wordListHeader = `
36
39
  # cspell-tools: keep-case no-split
@@ -48,7 +51,7 @@ function createWordListTarget(destFilename) {
48
51
  }
49
52
  function createTarget(destFilename) {
50
53
  const destDir = path.dirname(destFilename);
51
- const pDir = (0, fs_extra_1.mkdirp)(destDir);
54
+ const pDir = mkdirp(destDir);
52
55
  return async (seq) => {
53
56
  await pDir;
54
57
  await (0, fileWriter_1.writeSeqToFile)(seq, destFilename);
@@ -1,5 +1,5 @@
1
1
  import { type Operator } from '@cspell/cspell-pipe/sync';
2
- import { CompileOptions } from './CompileOptions';
2
+ import type { CompileOptions } from './CompileOptions';
3
3
  export declare function normalizeTargetWords(options: CompileOptions): Operator<string>;
4
4
  export interface ParseFileOptions {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { DictionarySource, FilePath, FileSource, FileListSource } from '../config';
1
+ import type { DictionarySource, FileListSource, FilePath, FileSource } from '../config';
2
2
  export declare function isFilePath(source: DictionarySource): source is FilePath;
3
3
  export declare function isFileSource(source: DictionarySource): source is FileSource;
4
4
  export declare function isFileListSource(source: DictionarySource): source is FileListSource;
@@ -24,9 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.createTestHelper = void 0;
27
+ const fs_1 = require("fs");
27
28
  const path = __importStar(require("path"));
28
29
  const shell = __importStar(require("shelljs"));
29
- const fs_1 = require("fs");
30
30
  const packageRoot = path.join(__dirname, '../..');
31
31
  const repoRoot = path.join(packageRoot, '../..');
32
32
  const tempDirBase = path.join(packageRoot, 'temp');
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.normalizeDirectorySeparator = exports.normalizeOutput = void 0;
27
- const escapeRegEx_1 = require("./escapeRegEx");
28
27
  const path = __importStar(require("path"));
28
+ const escapeRegEx_1 = require("./escapeRegEx");
29
29
  const rootCspellTools = path.join(__dirname, '../..');
30
30
  const rootRepo = path.join(rootCspellTools, '../..');
31
31
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cspell/cspell-tools",
3
- "version": "6.18.1",
3
+ "version": "6.19.0",
4
4
  "description": "Tools to assist with the development of cSpell",
5
5
  "typings": "dist/index.d.ts",
6
6
  "publishConfig": {
@@ -16,7 +16,7 @@
16
16
  "compile": "tsc -p .",
17
17
  "watch": "tsc -p . -w",
18
18
  "clean-build": "pnpm run clean && pnpm run build",
19
- "clean": "rimraf dist temp coverage .tsbuildinfo",
19
+ "clean": "shx rm -rf dist temp coverage .tsbuildinfo",
20
20
  "coverage": "jest --coverage",
21
21
  "test-watch": "jest --watch",
22
22
  "test": "jest",
@@ -48,31 +48,28 @@
48
48
  },
49
49
  "homepage": "https://github.com/streetsidesoftware/cspell#readme",
50
50
  "dependencies": {
51
- "@cspell/cspell-pipe": "6.18.1",
52
- "commander": "^9.4.1",
51
+ "@cspell/cspell-pipe": "6.19.0",
52
+ "commander": "^9.5.0",
53
53
  "cosmiconfig": "^8.0.0",
54
- "cspell-trie-lib": "6.18.1",
55
- "fs-extra": "^11.1.0",
54
+ "cspell-trie-lib": "6.19.0",
56
55
  "gensequence": "^4.0.3",
57
56
  "glob": "^8.0.3",
58
- "hunspell-reader": "6.18.1"
57
+ "hunspell-reader": "6.19.0"
59
58
  },
60
59
  "engines": {
61
60
  "node": ">=14"
62
61
  },
63
62
  "devDependencies": {
64
- "@types/fs-extra": "^9.0.13",
65
63
  "@types/glob": "^8.0.0",
66
- "@types/jest": "^29.2.4",
64
+ "@types/jest": "^29.2.5",
67
65
  "@types/node": "^18.11.18",
68
66
  "@types/rimraf": "^3.0.2",
69
67
  "@types/shelljs": "^0.8.11",
70
68
  "jest": "^29.3.1",
71
69
  "lorem-ipsum": "^2.0.8",
72
- "rimraf": "^3.0.2",
73
70
  "shelljs": "^0.8.5",
74
71
  "ts-json-schema-generator": "^1.2.0"
75
72
  },
76
73
  "main": "bin.js",
77
- "gitHead": "2570a9bb03e68864d30ed8024786b3b2eeddab2b"
74
+ "gitHead": "f643f0cd6384905618dbca950bd65a39a77dc028"
78
75
  }