@cspell/cspell-tools 7.3.8 → 8.0.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.
|
@@ -4,8 +4,9 @@ let systemFeatureFlags;
|
|
|
4
4
|
* These are primarily used before a feature has been fully released.
|
|
5
5
|
*/
|
|
6
6
|
export class FeatureFlags {
|
|
7
|
+
flags;
|
|
8
|
+
flagValues = new Map();
|
|
7
9
|
constructor(flags = []) {
|
|
8
|
-
this.flagValues = new Map();
|
|
9
10
|
this.flags = new Map(flags.map((f) => [f.name, f]));
|
|
10
11
|
}
|
|
11
12
|
register(flagOrName, description) {
|
|
@@ -61,6 +62,7 @@ export class FeatureFlags {
|
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
export class UnknownFeatureFlagError extends Error {
|
|
65
|
+
flag;
|
|
64
66
|
constructor(flag) {
|
|
65
67
|
super(`Unknown feature flag: ${flag}`);
|
|
66
68
|
this.flag = flag;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { createReader } from './Reader.js';
|
|
2
2
|
import { defaultAllowedSplitWords, defaultExcludeWordsCollection } from './WordsCollection.js';
|
|
3
3
|
class AllowedSplitWordsImpl {
|
|
4
|
+
words;
|
|
5
|
+
size;
|
|
4
6
|
constructor(collection) {
|
|
5
7
|
this.words = collection;
|
|
6
8
|
this.size = collection.size;
|
|
@@ -45,6 +47,8 @@ export function createWordsCollection(words) {
|
|
|
45
47
|
return new Set(arrWords);
|
|
46
48
|
}
|
|
47
49
|
class ExcludeWordsCollectionImpl {
|
|
50
|
+
words;
|
|
51
|
+
size;
|
|
48
52
|
constructor(collection) {
|
|
49
53
|
this.words = collection;
|
|
50
54
|
this.size = collection.size;
|
package/dist/test/TestHelper.js
CHANGED
|
@@ -15,11 +15,12 @@ export function createTestHelper(testFilenameUrl) {
|
|
|
15
15
|
}
|
|
16
16
|
const fixtureDir = path.join(packageRoot, 'fixtures');
|
|
17
17
|
class TestHelperImpl {
|
|
18
|
+
packageRoot = packageRoot;
|
|
19
|
+
repoRoot = repoRoot;
|
|
20
|
+
tempDir;
|
|
21
|
+
fixtureDir;
|
|
22
|
+
testCounter = new Map();
|
|
18
23
|
constructor(testFilename) {
|
|
19
|
-
this.packageRoot = packageRoot;
|
|
20
|
-
this.repoRoot = repoRoot;
|
|
21
|
-
this.testCounter = new Map();
|
|
22
|
-
this.createTempDir = this.mkdir;
|
|
23
24
|
this.tempDir = path.join(tempDirBase, path.relative(packageRoot, testFilename));
|
|
24
25
|
this.fixtureDir = fixtureDir;
|
|
25
26
|
}
|
|
@@ -89,6 +90,7 @@ class TestHelperImpl {
|
|
|
89
90
|
packageTemp(...parts) {
|
|
90
91
|
return path.resolve(tempDirBase, ...parts);
|
|
91
92
|
}
|
|
93
|
+
createTempDir = this.mkdir;
|
|
92
94
|
async fileExists(path) {
|
|
93
95
|
try {
|
|
94
96
|
await fs.stat(path);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cspell/cspell-tools",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Tools to assist with the development of cSpell",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -48,23 +48,23 @@
|
|
|
48
48
|
},
|
|
49
49
|
"homepage": "https://github.com/streetsidesoftware/cspell#readme",
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@cspell/cspell-pipe": "
|
|
51
|
+
"@cspell/cspell-pipe": "8.0.0",
|
|
52
52
|
"commander": "^11.1.0",
|
|
53
53
|
"cosmiconfig": "8.0.0",
|
|
54
|
-
"cspell-trie-lib": "
|
|
54
|
+
"cspell-trie-lib": "8.0.0",
|
|
55
55
|
"gensequence": "^6.0.0",
|
|
56
56
|
"glob": "^10.3.10",
|
|
57
|
-
"hunspell-reader": "
|
|
58
|
-
"yaml": "^2.3.
|
|
57
|
+
"hunspell-reader": "8.0.0",
|
|
58
|
+
"yaml": "^2.3.4"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
61
|
+
"node": ">=18"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@types/glob": "^8.1.0",
|
|
65
65
|
"lorem-ipsum": "^2.0.8",
|
|
66
|
-
"ts-json-schema-generator": "^1.
|
|
66
|
+
"ts-json-schema-generator": "^1.4.0"
|
|
67
67
|
},
|
|
68
68
|
"module": "bin.mjs",
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "67c22bf98baed1c17bbc658fba8656262d17e370"
|
|
70
70
|
}
|