@tsed/engines
Advanced tools
Comparing version 7.61.1 to 7.61.2
@@ -29,2 +29,3 @@ "use strict"; | ||
const node_path_1 = require("node:path"); | ||
const promises_1 = require("node:fs/promises"); | ||
const readCache = new Map(); | ||
@@ -99,3 +100,2 @@ const cacheStore = new Map(); | ||
async function read(path, options) { | ||
const fs = await Promise.resolve().then(() => __importStar(require("fs-extra"))); | ||
let str = readCache.get(path); | ||
@@ -107,3 +107,3 @@ // cached (only if cached is a string and not a compiled template function) | ||
// read | ||
str = await fs.readFile(path, "utf8"); | ||
str = await (0, promises_1.readFile)(path, "utf8"); | ||
// remove extraneous utf8 BOM marker | ||
@@ -110,0 +110,0 @@ str = str.replace(/^\uFEFF/, ""); |
import { dirname, extname, isAbsolute, join } from "node:path"; | ||
import { readFile } from "node:fs/promises"; | ||
const readCache = new Map(); | ||
@@ -64,3 +65,2 @@ const cacheStore = new Map(); | ||
export async function read(path, options) { | ||
const fs = await import("fs-extra"); | ||
let str = readCache.get(path); | ||
@@ -72,3 +72,3 @@ // cached (only if cached is a string and not a compiled template function) | ||
// read | ||
str = await fs.readFile(path, "utf8"); | ||
str = await readFile(path, "utf8"); | ||
// remove extraneous utf8 BOM marker | ||
@@ -75,0 +75,0 @@ str = str.replace(/^\uFEFF/, ""); |
{ | ||
"name": "@tsed/engines", | ||
"version": "7.61.1", | ||
"version": "7.61.2", | ||
"description": "Template engines library. Provide an API to adding custom engines from decorators.", | ||
@@ -19,9 +19,5 @@ "source": "./src/index.ts", | ||
"test": "cross-env NODE_ENV=test nyc mocha --timeout 15000", | ||
"build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json", | ||
"lint": "eslint '**/*.{ts,js}'", | ||
"lint:fix": "eslint '**/*.{ts,js}' --fix" | ||
"build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json" | ||
}, | ||
"dependencies": { | ||
"filedirname": "^2.7.0", | ||
"fs-extra": "11.1.1", | ||
"tslib": "2.6.1" | ||
@@ -34,5 +30,3 @@ }, | ||
"@babel/preset-react": "7.22.15", | ||
"@tsed/eslint": "7.61.1", | ||
"@tsed/typescript": "7.61.1", | ||
"@types/fs-extra": "^11.0.3", | ||
"@tsed/typescript": "7.61.2", | ||
"@types/semver": "^7.3.9", | ||
@@ -52,2 +46,3 @@ "atpl": "0.9.3", | ||
"eslint": "^8.12.0", | ||
"filedirname": "^2.7.0", | ||
"haml": "^0.4.3", | ||
@@ -54,0 +49,0 @@ "haml-coffee": "^1.14.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
58
7
192358
207
2574
- Removedfiledirname@^2.7.0
- Removedfs-extra@11.1.1
- Removedfiledirname@2.11.0(transitive)
- Removedfs-extra@11.1.1(transitive)
- Removedget-current-line@6.10.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removeduniversalify@2.0.1(transitive)