@alint-js/languages 0.2.0 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -4
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -8,7 +8,8 @@ function definePlugin(plugin) {
8
8
  }
9
9
  //#endregion
10
10
  //#region src/grammar.ts
11
- const grammarDir = join(dirname(createRequire(import.meta.url).resolve("tree-sitter-wasms/package.json")), "out");
11
+ const nodeRequire = createRequire(import.meta.url);
12
+ const grammarDir = join(dirname(nodeRequire.resolve("tree-sitter-wasms/package.json")), "out");
12
13
  /**
13
14
  * Which languages this package provides, and the grammar each is parsed with. Adding a language
14
15
  * starts here: `LanguageId` is derived from these keys, and `QUERIES` must then cover it too.
@@ -135,9 +136,7 @@ async function extractTargets(file) {
135
136
  case "function":
136
137
  functionNodes.push(node);
137
138
  break;
138
- case "identifier":
139
- identifiers.push(rangeOf(node));
140
- break;
139
+ case "identifier": identifiers.push(rangeOf(node));
141
140
  }
142
141
  const renameable = identifiers.filter((range) => !anchored.has(range.start));
143
142
  const commentStarts = new Set(comments.map((range) => range.start));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alint-js/languages",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.mts",
@@ -13,15 +13,15 @@
13
13
  "dist"
14
14
  ],
15
15
  "peerDependencies": {
16
- "@alint-js/core": "0.2.0"
16
+ "@alint-js/core": "0.3.0"
17
17
  },
18
18
  "dependencies": {
19
19
  "tree-sitter-wasms": "^0.1.13",
20
20
  "web-tree-sitter": "^0.24.7"
21
21
  },
22
22
  "devDependencies": {
23
- "@alint-js/core": "0.2.0",
24
- "@alint-js/plugin": "0.2.0"
23
+ "@alint-js/core": "0.3.0",
24
+ "@alint-js/plugin": "0.3.0"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "tsdown",