fix: maybe
This commit is contained in:
7
node_modules/svelte-preprocess/dist/transformers/typescript.js
generated
vendored
7
node_modules/svelte-preprocess/dist/transformers/typescript.js
generated
vendored
@ -82,7 +82,6 @@ function createSourceMapChain({ filename, content, compilerOptions, }) {
|
||||
function injectVarsToCode({ content, markup, filename, attributes, sourceMapChain, }) {
|
||||
if (!markup)
|
||||
return content;
|
||||
// @ts-ignore different in Svelte 5
|
||||
const { vars } = (0, compiler_1.compile)((0, markup_1.stripTags)(markup), {
|
||||
generate: false,
|
||||
varsReport: 'full',
|
||||
@ -324,11 +323,9 @@ const transformer = async ({ content, filename, markup, options = {}, attributes
|
||||
filename = (0, path_1.isAbsolute)(filename) ? filename : (0, path_1.resolve)(basePath, filename);
|
||||
const compilerOptions = getCompilerOptions({ filename, options, basePath });
|
||||
const versionParts = package_json_1.default.version.split('.');
|
||||
const canUseMixedImportsTranspiler = +versionParts[0] === 4 ||
|
||||
(+versionParts[0] === 3 && +versionParts[1] >= 39);
|
||||
const canUseMixedImportsTranspiler = +versionParts[0] > 3 || (+versionParts[0] === 3 && +versionParts[1] >= 39);
|
||||
if (!canUseMixedImportsTranspiler && options.handleMixedImports) {
|
||||
throw new Error('You need at least Svelte 3.39 and at most Svelte 4.x to use the handleMixedImports option. ' +
|
||||
'The option is no longer available for Svelte 5 and beyond. Use the verbatimModuleSyntax TypeScript option instead.');
|
||||
throw new Error('You need at least Svelte 3.39 to use the handleMixedImports option');
|
||||
}
|
||||
const handleMixedImports = !compilerOptions.preserveValueImports &&
|
||||
!compilerOptions.verbatimModuleSyntax &&
|
||||
|
2
node_modules/svelte-preprocess/dist/types/index.d.ts
generated
vendored
2
node_modules/svelte-preprocess/dist/types/index.d.ts
generated
vendored
@ -9,7 +9,7 @@ export type TransformerArgs<T> = {
|
||||
attributes?: Record<string, any>;
|
||||
map?: string | object;
|
||||
markup?: string;
|
||||
diagnostics?: unknown[];
|
||||
dianostics?: unknown[];
|
||||
options?: T;
|
||||
};
|
||||
/**
|
||||
|
282
node_modules/svelte-preprocess/package.json
generated
vendored
282
node_modules/svelte-preprocess/package.json
generated
vendored
@ -1,142 +1,140 @@
|
||||
{
|
||||
"name": "svelte-preprocess",
|
||||
"version": "5.1.0",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"description": "A Svelte preprocessor wrapper with baked-in support for commonly used preprocessors",
|
||||
"author": "Christian Kaisermann <christian@kaisermann.me>",
|
||||
"repository": "https://github.com/sveltejs/svelte-preprocess",
|
||||
"keywords": [
|
||||
"svelte",
|
||||
"preprocess",
|
||||
"less",
|
||||
"stylus",
|
||||
"sass",
|
||||
"scss",
|
||||
"pug",
|
||||
"coffeescript"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 14.10.0"
|
||||
},
|
||||
"volta": {
|
||||
"node": "14.19.2"
|
||||
},
|
||||
"files": [
|
||||
"dist/"
|
||||
],
|
||||
"scripts": {
|
||||
"prebuild": "node scripts.js rmrf ./dist",
|
||||
"build": "tsc --build tsconfig.build.json",
|
||||
"dev": "pnpm build -w",
|
||||
"test": "jest",
|
||||
"lint": "eslint --ext js,ts .",
|
||||
"format": "prettier --write \"**/*.{ts,js,json}\"",
|
||||
"postinstall": "echo \"[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...\"",
|
||||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1 && git add CHANGELOG.md",
|
||||
"patch": "npm version patch -m 'chore(release): %s'",
|
||||
"minor": "npm version minor -m 'chore(release): %s'",
|
||||
"major": "npm version major -m 'chore(release): %s'",
|
||||
"prepublishOnly": "pnpm test && pnpm build",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"commitlint": {
|
||||
"extends": [
|
||||
"@commitlint/config-conventional"
|
||||
]
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,js,tsx,jsx}": [
|
||||
"eslint --fix",
|
||||
"prettier --write"
|
||||
],
|
||||
"*.json": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.5",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@commitlint/cli": "^11.0.0",
|
||||
"@commitlint/config-conventional": "^11.0.0",
|
||||
"@kiwi/eslint-config": "^2.0.2",
|
||||
"@kiwi/prettier-config": "^2.0.2",
|
||||
"@types/babel__core": "^7.1.20",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "^14.18.34",
|
||||
"@types/stylus": "^0.48.38",
|
||||
"autoprefixer": "^9.8.8",
|
||||
"babel-minify": "^0.5.2",
|
||||
"coffeescript": "^2.7.0",
|
||||
"conventional-changelog-cli": "^2.2.2",
|
||||
"eslint": "^8.29.0",
|
||||
"husky": "^8.0.2",
|
||||
"jest": "^29.5.0",
|
||||
"less": "^3.13.1",
|
||||
"lint-staged": "^10.5.4",
|
||||
"postcss": "^8.4.19",
|
||||
"postcss-easy-import": "^3.0.0",
|
||||
"postcss-load-config": "^3.1.4",
|
||||
"prettier": "^2.8.1",
|
||||
"pug": "^3.0.2",
|
||||
"sass": "^1.56.2",
|
||||
"stylus": "^0.55.0",
|
||||
"sugarss": "^4.0.0",
|
||||
"svelte": "^3.54.0",
|
||||
"ts-jest": "^29.0.5",
|
||||
"typescript": "^5.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/pug": "^2.0.6",
|
||||
"detect-indent": "^6.1.0",
|
||||
"magic-string": "^0.27.0",
|
||||
"sorcery": "^0.11.0",
|
||||
"strip-indent": "^3.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.10.2",
|
||||
"coffeescript": "^2.5.1",
|
||||
"less": "^3.11.3 || ^4.0.0",
|
||||
"postcss": "^7 || ^8",
|
||||
"postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0",
|
||||
"pug": "^3.0.0",
|
||||
"sass": "^1.26.8",
|
||||
"stylus": "^0.55.0",
|
||||
"sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0",
|
||||
"svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0",
|
||||
"typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@babel/core": {
|
||||
"optional": true
|
||||
},
|
||||
"coffeescript": {
|
||||
"optional": true
|
||||
},
|
||||
"less": {
|
||||
"optional": true
|
||||
},
|
||||
"postcss": {
|
||||
"optional": true
|
||||
},
|
||||
"postcss-load-config": {
|
||||
"optional": true
|
||||
},
|
||||
"pug": {
|
||||
"optional": true
|
||||
},
|
||||
"sass": {
|
||||
"optional": true
|
||||
},
|
||||
"stylus": {
|
||||
"optional": true
|
||||
},
|
||||
"sugarss": {
|
||||
"optional": true
|
||||
},
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "svelte-preprocess",
|
||||
"version": "5.0.4",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"description": "A Svelte preprocessor wrapper with baked-in support for commonly used preprocessors",
|
||||
"author": "Christian Kaisermann <christian@kaisermann.me>",
|
||||
"repository": "https://github.com/sveltejs/svelte-preprocess",
|
||||
"keywords": [
|
||||
"svelte",
|
||||
"preprocess",
|
||||
"less",
|
||||
"stylus",
|
||||
"sass",
|
||||
"scss",
|
||||
"pug",
|
||||
"coffeescript"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 14.10.0"
|
||||
},
|
||||
"volta": {
|
||||
"node": "14.19.2"
|
||||
},
|
||||
"files": [
|
||||
"dist/"
|
||||
],
|
||||
"commitlint": {
|
||||
"extends": [
|
||||
"@commitlint/config-conventional"
|
||||
]
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,js,tsx,jsx}": [
|
||||
"eslint --fix",
|
||||
"prettier --write"
|
||||
],
|
||||
"*.json": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.5",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@commitlint/cli": "^11.0.0",
|
||||
"@commitlint/config-conventional": "^11.0.0",
|
||||
"@kiwi/eslint-config": "^2.0.2",
|
||||
"@kiwi/prettier-config": "^2.0.2",
|
||||
"@types/babel__core": "^7.1.20",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "^14.18.34",
|
||||
"@types/stylus": "^0.48.38",
|
||||
"autoprefixer": "^9.8.8",
|
||||
"babel-minify": "^0.5.2",
|
||||
"coffeescript": "^2.7.0",
|
||||
"conventional-changelog-cli": "^2.2.2",
|
||||
"eslint": "^8.29.0",
|
||||
"husky": "^8.0.2",
|
||||
"jest": "^29.5.0",
|
||||
"less": "^3.13.1",
|
||||
"lint-staged": "^10.5.4",
|
||||
"postcss": "^8.4.19",
|
||||
"postcss-easy-import": "^3.0.0",
|
||||
"postcss-load-config": "^3.1.4",
|
||||
"prettier": "^2.8.1",
|
||||
"pug": "^3.0.2",
|
||||
"sass": "^1.56.2",
|
||||
"stylus": "^0.55.0",
|
||||
"sugarss": "^4.0.0",
|
||||
"svelte": "^3.54.0",
|
||||
"ts-jest": "^29.0.5",
|
||||
"typescript": "^5.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/pug": "^2.0.6",
|
||||
"detect-indent": "^6.1.0",
|
||||
"magic-string": "^0.27.0",
|
||||
"sorcery": "^0.11.0",
|
||||
"strip-indent": "^3.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.10.2",
|
||||
"coffeescript": "^2.5.1",
|
||||
"less": "^3.11.3 || ^4.0.0",
|
||||
"postcss": "^7 || ^8",
|
||||
"postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0",
|
||||
"pug": "^3.0.0",
|
||||
"sass": "^1.26.8",
|
||||
"stylus": "^0.55.0",
|
||||
"sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0",
|
||||
"svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0",
|
||||
"typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@babel/core": {
|
||||
"optional": true
|
||||
},
|
||||
"coffeescript": {
|
||||
"optional": true
|
||||
},
|
||||
"less": {
|
||||
"optional": true
|
||||
},
|
||||
"postcss": {
|
||||
"optional": true
|
||||
},
|
||||
"postcss-load-config": {
|
||||
"optional": true
|
||||
},
|
||||
"pug": {
|
||||
"optional": true
|
||||
},
|
||||
"sass": {
|
||||
"optional": true
|
||||
},
|
||||
"stylus": {
|
||||
"optional": true
|
||||
},
|
||||
"sugarss": {
|
||||
"optional": true
|
||||
},
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"prebuild": "node scripts.js rmrf ./dist",
|
||||
"build": "tsc --build tsconfig.build.json",
|
||||
"dev": "pnpm build -w",
|
||||
"test": "jest",
|
||||
"lint": "eslint --ext js,ts .",
|
||||
"format": "prettier --write \"**/*.{ts,js,json}\"",
|
||||
"postinstall": "echo \"[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...\"",
|
||||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1 && git add CHANGELOG.md",
|
||||
"patch": "npm version patch -m 'chore(release): %s'",
|
||||
"minor": "npm version minor -m 'chore(release): %s'",
|
||||
"major": "npm version major -m 'chore(release): %s'"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user