comment-variables 1.3.0 → 1.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.
@@ -6,7 +6,7 @@ export const variationsData = Object.freeze({
6
6
  [FR]: Object.freeze(frTestData),
7
7
  });
8
8
 
9
- export const composedVariablesExclusives = ["FORCOMPOSED3"]; // can be omitted
9
+ export const composedVariablesExclusives = ["FR#FORCOMPOSED3"]; // can be omitted
10
10
 
11
11
  // const HELLO = "Hello.";
12
12
 
@@ -22,4 +22,6 @@ export const variations = {
22
22
  // referenceData: { ...enTestData }, // correctly errors (reference only) (with OG enTestData)
23
23
  // also
24
24
  referenceVariant: EN,
25
+
26
+ allowIncompleteVariations: true,
25
27
  };
@@ -14,6 +14,8 @@ export const enTestData = Object.freeze({
14
14
  "$COMMENT#EN#FORCOMPOSED1 $COMMENT#EN#FORCOMPOSED2" /* variations: $COMMENT#COMPOSED / core: $COMMENT#EN#COMPOSED */,
15
15
  composedWithAlias:
16
16
  "$COMMENT#EN#FORCOMPOSED1 $COMMENT#EN#FORCOMPOSED2 $COMMENT#EN#HELLOALIAS" /* variations: $COMMENT#COMPOSEDWITHALIAS / core: $COMMENT#EN#COMPOSEDWITHALIAS */,
17
+ _testFunction:
18
+ "A test function, with its JSDoc appropriately shifting between English and French." /* variations: $COMMENT#_TESTFUNCTION / core: $COMMENT#EN#_TESTFUNCTION */,
17
19
  // fr: "something", // now errors, can't have a variant as top-level key of a variation
18
20
  });
19
21
 
@@ -36,5 +38,7 @@ export const frTestData = Object.freeze({
36
38
  "$COMMENT#FR#FORCOMPOSED1 $COMMENT#FR#FORCOMPOSED2" /* variations: $COMMENT#COMPOSED / core: $COMMENT#FR#COMPOSED */,
37
39
  composedWithAlias:
38
40
  "$COMMENT#FR#FORCOMPOSED1 $COMMENT#FR#FORCOMPOSED2 $COMMENT#FR#HELLOALIAS" /* variations: $COMMENT#COMPOSEDWITHALIAS / core: $COMMENT#FR#COMPOSEDWITHALIAS */,
41
+ // _testFunction:
42
+ // "Une fonction de test, avec sa JSDoc basculant du français à l'anglais sur demande." /* variations: $COMMENT#_TESTFUNCTION / core: $COMMENT#FR#_TESTFUNCTION */,
39
43
  // fr: "quelque chose", // now errors, can't have a variant as top-level key of a variation
40
44
  });
@@ -4,13 +4,13 @@ $COMMENT#GOODBYE
4
4
  $COMMENT#HELLOALIAS // HELLOALIAS
5
5
  $COMMENT#COMPOSED
6
6
  $COMMENT#COMPOSEDWITHALIAS
7
- // Now these should resolve on extension, while these below should not, when variations are specified.
7
+ // Now these should/do resolve on extension, while these below should/do not, when variations are specified.
8
8
 
9
9
  $COMMENT#FORCOMPOSED3 // should/does not resolve as exclusive
10
10
  $COMMENT#EN#HELLO // should/does not resolve on CLI
11
11
  $COMMENT#FR#HELLO // should/does not resolve on extension
12
12
  TEST END */
13
13
 
14
- /** $COMMENT#COMPOSEDWITHALIAS */
14
+ /** $COMMENT#_TESTFUNCTION */
15
15
  const _testFunction = () => {};
16
- // The TypeScript server plugin also needs to be adapted to variations. Done.
16
+ // The TypeScript server plugin is now also adapted to variations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comment-variables",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "A CLI tool for configuring, managing and maintaining JavaScript comments as JavaScript variables.",
5
5
  "bin": {
6
6
  "comment-variables": "./library/index.js",
@@ -31,7 +31,7 @@
31
31
  "type": "module",
32
32
  "dependencies": {
33
33
  "@eslint/markdown": "^6.5.0",
34
- "comment-variables-resolve-config": "^1.16.1",
34
+ "comment-variables-resolve-config": "^1.17.0",
35
35
  "eslint": "^9.29.0"
36
36
  },
37
37
  "devDependencies": {