@volar/language-core 2.4.23 → 2.4.25

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/index.js CHANGED
@@ -57,7 +57,7 @@ function createLanguage(plugins, scriptRegistry, sync, onAssociationDirty) {
57
57
  }
58
58
  }
59
59
  if (!languageId) {
60
- console.warn(`languageId not found for ${id}`);
60
+ console.warn(`languageId not found for ${String(id)}`);
61
61
  return;
62
62
  }
63
63
  let associatedOnly = false;
@@ -119,7 +119,7 @@ function createLanguage(plugins, scriptRegistry, sync, onAssociationDirty) {
119
119
  snapshot,
120
120
  associatedIds: new Set(),
121
121
  targetIds: new Set(),
122
- associatedOnly
122
+ associatedOnly,
123
123
  };
124
124
  scriptRegistry.set(id, sourceScript);
125
125
  if (associatedOnly) {
package/lib/editor.js CHANGED
@@ -150,7 +150,8 @@ function findOverlapCodeRange(start, end, map, filter) {
150
150
  for (const mapping of map.mappings) {
151
151
  if (filter(mapping.data)) {
152
152
  const mappingStart = mapping.sourceOffsets[0];
153
- const mappingEnd = mapping.sourceOffsets[mapping.sourceOffsets.length - 1] + mapping.lengths[mapping.lengths.length - 1];
153
+ const mappingEnd = mapping.sourceOffsets[mapping.sourceOffsets.length - 1]
154
+ + mapping.lengths[mapping.lengths.length - 1];
154
155
  const overlap = getOverlapRange(start, end, mappingStart, mappingEnd);
155
156
  if (overlap) {
156
157
  const curMappedStart = (overlap.start - mappingStart) + mapping.generatedOffsets[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-core",
3
- "version": "2.4.23",
3
+ "version": "2.4.25",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/language-core"
13
13
  },
14
14
  "dependencies": {
15
- "@volar/source-map": "2.4.23"
15
+ "@volar/source-map": "2.4.25"
16
16
  },
17
- "gitHead": "9b06fb744475622284870f6cc4e638dc7747daef"
17
+ "gitHead": "cff5cbf8cfe438e27b2ccbc15248937308ff21a7"
18
18
  }