@kitajs/ts-html-plugin
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -6,5 +6,5 @@ #!/usr/bin/env node | ||
const chalk_1 = tslib_1.__importDefault(require("chalk")); | ||
const fs_1 = tslib_1.__importDefault(require("fs")); | ||
const os_1 = require("os"); | ||
const path_1 = tslib_1.__importDefault(require("path")); | ||
const node_fs_1 = tslib_1.__importDefault(require("node:fs")); | ||
const node_os_1 = require("node:os"); | ||
const node_path_1 = tslib_1.__importDefault(require("node:path")); | ||
const typescript_1 = tslib_1.__importDefault(require("typescript")); | ||
@@ -47,3 +47,3 @@ const yargs_1 = tslib_1.__importDefault(require("yargs")); | ||
} | ||
const { options, errors, fileNames } = typescript_1.default.parseJsonConfigFileContent(config, typescript_1.default.sys, path_1.default.dirname(tsconfigPath), undefined, tsconfigPath); | ||
const { options, errors, fileNames } = typescript_1.default.parseJsonConfigFileContent(config, typescript_1.default.sys, node_path_1.default.dirname(tsconfigPath), undefined, tsconfigPath); | ||
if (errors.length) { | ||
@@ -72,3 +72,3 @@ return { errors }; | ||
for (const [file, amount] of files.entries()) { | ||
console.error(chalk_1.default.red(`Found ${amount} error${amount === 1 ? '' : 's'} in ${path_1.default.relative(root, file)}`)); | ||
console.error(chalk_1.default.red(`Found ${amount} error${amount === 1 ? '' : 's'} in ${node_path_1.default.relative(root, file)}`)); | ||
} | ||
@@ -78,3 +78,3 @@ } | ||
try { | ||
fs_1.default.statSync(p); | ||
node_fs_1.default.statSync(p); | ||
return true; | ||
@@ -123,3 +123,3 @@ } | ||
getCanonicalFileName: (fileName) => fileName, | ||
getNewLine: () => os_1.EOL | ||
getNewLine: () => node_os_1.EOL | ||
}; | ||
@@ -135,3 +135,3 @@ if (tsconfig.errors) { | ||
for (let i = 0; i < args._.length; i++) { | ||
let file = String(args._[i]); | ||
const file = String(args._[i]); | ||
if (!fileExists(file)) { | ||
@@ -149,3 +149,3 @@ console.error((!simplified ? chalk_1.default.red : String)(`Could not find provided '${file}' file.`)); | ||
if (!files.length) { | ||
console.error((!simplified ? chalk_1.default.red : String)(`No files were found to check.`)); | ||
console.error((!simplified ? chalk_1.default.red : String)('No files were found to check.')); | ||
return process.exit(1); | ||
@@ -152,0 +152,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import ts, { JsxFragment } from 'typescript'; | ||
import ts, { type JsxFragment } from 'typescript'; | ||
import type { Diagnostic, JsxElement, JsxOpeningElement, Node, default as TS, Type, TypeChecker } from 'typescript/lib/tsserverlibrary'; | ||
@@ -3,0 +3,0 @@ /** If the node is a JSX element or fragment */ |
@@ -84,3 +84,2 @@ "use strict"; | ||
diagnostics.push(diagnostic(safeAttribute, 'UnusedSafe', 'Warning')); | ||
continue; | ||
} | ||
@@ -251,3 +250,3 @@ } | ||
const proxy = Object.create(null); | ||
for (let k of Object.keys(obj)) { | ||
for (const k of Object.keys(obj)) { | ||
const x = obj[k]; | ||
@@ -254,0 +253,0 @@ // @ts-expect-error - JS runtime trickery which is tricky to type tersely |
{ | ||
"name": "@kitajs/ts-html-plugin", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"homepage": "https://github.com/kitajs/html/tree/master/packages/ts-html-plugin#readme", | ||
@@ -35,4 +35,4 @@ "bugs": "https://github.com/kitajs/html/issues", | ||
"peerDependencies": { | ||
"typescript": "^5.3.3", | ||
"@kitajs/html": "^4.0.0" | ||
"@kitajs/html": "^4.1.0", | ||
"typescript": "^5.3.3" | ||
}, | ||
@@ -39,0 +39,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
84281
1
505