@astrojs/ts-plugin
Advanced tools
Comparing version 1.10.2 to 1.10.3
@@ -14,3 +14,3 @@ import { type CodeMapping, type LanguagePlugin, type VirtualCode } from '@volar/language-core'; | ||
}; | ||
export declare function getFrontmatterLanguagePlugin(collectionConfigs: CollectionConfig[]): LanguagePlugin<string, FrontmatterHolder>; | ||
export declare function getFrontmatterLanguagePlugin(collectionConfig: CollectionConfig[]): LanguagePlugin<string, FrontmatterHolder>; | ||
export declare class FrontmatterHolder implements VirtualCode { | ||
@@ -17,0 +17,0 @@ fileName: string; |
@@ -12,4 +12,4 @@ "use strict"; | ||
exports.frontmatterRE = /^---(.*?)^---/ms; | ||
function getCollectionName(collectionConfigs, fsPath) { | ||
for (const collection of collectionConfigs) { | ||
function getCollectionName(collectionConfig, fsPath) { | ||
for (const collection of collectionConfig) { | ||
if (collection.config.entries[fsPath]) { | ||
@@ -20,3 +20,3 @@ return collection.config.entries[fsPath]; | ||
} | ||
function getFrontmatterLanguagePlugin(collectionConfigs) { | ||
function getFrontmatterLanguagePlugin(collectionConfig) { | ||
return { | ||
@@ -35,3 +35,3 @@ getLanguageId(scriptId) { | ||
// so we'll have to convert it to a URL to match the collection config entries | ||
getCollectionName(collectionConfigs, (0, node_url_1.pathToFileURL)(fileName).toString().toLowerCase())); | ||
getCollectionName(collectionConfig, (0, node_url_1.pathToFileURL)(fileName).toString().toLowerCase())); | ||
} | ||
@@ -38,0 +38,0 @@ }, |
{ | ||
"name": "@astrojs/ts-plugin", | ||
"version": "1.10.2", | ||
"version": "1.10.3", | ||
"description": "A TypeScript Plugin providing Astro intellisense", | ||
@@ -28,4 +28,4 @@ "main": "dist/index.js", | ||
"@jridgewell/sourcemap-codec": "^1.4.15", | ||
"@volar/language-core": "~2.4.0", | ||
"@volar/typescript": "~2.4.0", | ||
"@volar/language-core": "~2.4.5", | ||
"@volar/typescript": "~2.4.5", | ||
"semver": "^7.3.8", | ||
@@ -39,7 +39,8 @@ "vscode-languageserver-textdocument": "^1.0.11" | ||
"@types/semver": "^7.3.13", | ||
"@vscode/test-electron": "^2.3.2", | ||
"chai": "^4.3.7", | ||
"glob": "^8.0.3", | ||
"mocha": "^10.2.0", | ||
"vscode-uri": "^3.0.8", | ||
"typescript": "^5.5.4" | ||
"typescript": "^5.5.4", | ||
"vscode-uri": "^3.0.8" | ||
}, | ||
@@ -46,0 +47,0 @@ "scripts": { |
19338
10
Updated@volar/language-core@~2.4.5
Updated@volar/typescript@~2.4.5