@volar/language-core 2.2.0-alpha.4 → 2.2.0-alpha.6

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/index.js +6 -0
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -142,6 +142,12 @@ function createLanguage(plugins, caseSensitive, sync) {
142
142
  exports.createLanguage = createLanguage;
143
143
  function updateVirtualCodeMapOfMap(virtualCode, mapOfMap, getSourceSnapshot) {
144
144
  const sources = new Set();
145
+ if (!virtualCode.mappings.length) {
146
+ const source = getSourceSnapshot(undefined);
147
+ if (source) {
148
+ mapOfMap.set(source[0], [source[1], new source_map_1.SourceMap([])]);
149
+ }
150
+ }
145
151
  for (const mapping of virtualCode.mappings) {
146
152
  if (sources.has(mapping.source)) {
147
153
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-core",
3
- "version": "2.2.0-alpha.4",
3
+ "version": "2.2.0-alpha.6",
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.2.0-alpha.4"
15
+ "@volar/source-map": "2.2.0-alpha.6"
16
16
  },
17
- "gitHead": "bd85b9c56d71c411fa3342696014c4b5f7436568"
17
+ "gitHead": "c9eb6bc56a5bf0c7c1fddfc66d35717daf0a630e"
18
18
  }