@volar/language-core 2.3.2 → 2.3.4

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 +0 -9
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -86,7 +86,6 @@ function createLanguage(plugins, scriptRegistry, sync) {
86
86
  ? updateVirtualCode(id, sourceScript.generated.root, snapshot, codegenCtx)
87
87
  : createVirtualCode?.(id, languageId, snapshot, codegenCtx);
88
88
  if (newVirtualCode) {
89
- verifyVirtualCode(newVirtualCode);
90
89
  sourceScript.generated.root = newVirtualCode;
91
90
  sourceScript.generated.embeddedCodes.clear();
92
91
  for (const code of forEachEmbeddedCode(sourceScript.generated.root)) {
@@ -124,7 +123,6 @@ function createLanguage(plugins, scriptRegistry, sync) {
124
123
  for (const languagePlugin of _plugins) {
125
124
  const virtualCode = languagePlugin.createVirtualCode?.(id, languageId, snapshot, prepareCreateVirtualCode(sourceScript));
126
125
  if (virtualCode) {
127
- verifyVirtualCode(virtualCode);
128
126
  sourceScript.generated = {
129
127
  root: virtualCode,
130
128
  languagePlugin,
@@ -224,13 +222,6 @@ function createLanguage(plugins, scriptRegistry, sync) {
224
222
  };
225
223
  }
226
224
  }
227
- function verifyVirtualCode(virtualCode) {
228
- for (const code of forEachEmbeddedCode(virtualCode)) {
229
- if (code.id !== code.id.toLowerCase()) {
230
- throw new Error(`VirtualCode id must be lowercase: ${code.id}`);
231
- }
232
- }
233
- }
234
225
  function* forEachEmbeddedCode(virtualCode) {
235
226
  yield virtualCode;
236
227
  if (virtualCode.embeddedCodes) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-core",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
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.3.2"
15
+ "@volar/source-map": "2.3.4"
16
16
  },
17
- "gitHead": "d07e7d7c4176eec4905e7a629ae6f278d1c72b48"
17
+ "gitHead": "ba5b381923bbc8a565e84de72fa98474501fe817"
18
18
  }