ssg-api
Advanced tools
Comparing version 1.7.1 to 1.7.2
@@ -8,2 +8,7 @@ # Change Log | ||
## [1.7.2] - 2024-02-22 | ||
### Changed | ||
Replaced native charset detection by JS one. | ||
## [1.7.0] - 2024-01-17 | ||
@@ -10,0 +15,0 @@ |
/// <reference types="node" /> | ||
import { IOptions } from 'glob'; | ||
import { IOptions } from "glob"; | ||
export declare class FileUtil { | ||
@@ -4,0 +4,0 @@ static toBufferEncoding(encoding: string | undefined): BufferEncoding | undefined; |
@@ -1,7 +0,7 @@ | ||
import * as fs from 'fs'; | ||
import { promises as fsAsync } from 'fs'; | ||
import detectCharacterEncoding from 'detect-character-encoding'; | ||
import path from 'path'; | ||
import { readdir } from 'fs/promises'; | ||
import { promise as glob } from 'glob-promise'; | ||
import * as fs from "fs"; | ||
import { promises as fsAsync } from "fs"; | ||
import { detectEncoding } from "char-encoding-detector"; | ||
import path from "path"; | ||
import { readdir } from "fs/promises"; | ||
import { promise as glob } from "glob-promise"; | ||
export class FileUtil { | ||
@@ -26,3 +26,3 @@ static toBufferEncoding(encoding) { | ||
try { | ||
guessedEncoding = detectCharacterEncoding(fileBuffer); | ||
guessedEncoding = detectEncoding(fileBuffer); | ||
} | ||
@@ -35,3 +35,3 @@ catch (e) { | ||
if (guessedEncoding) { | ||
return this.toBufferEncoding(guessedEncoding.encoding); | ||
return this.toBufferEncoding(guessedEncoding); | ||
} | ||
@@ -38,0 +38,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"author": "Jérôme Beau <javarome@gmail.com> (https://javarome.com)", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"description": "Static Site Generation TypeScript API", | ||
@@ -28,3 +28,3 @@ "exports": "./dist/src/index.js", | ||
"dependencies": { | ||
"detect-character-encoding": "^0.8.0", | ||
"char-encoding-detector": "^0.0.9", | ||
"glob-promise": "^6.0.5", | ||
@@ -34,3 +34,2 @@ "jsdom": "^22.1.0" | ||
"devDependencies": { | ||
"@types/detect-character-encoding": "~0.7.2", | ||
"@types/jsdom": "^21.1.3", | ||
@@ -37,0 +36,0 @@ "typescript": "^5.2.2", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
80427
5
+ Addedchar-encoding-detector@0.0.9(transitive)
- Removeddetect-character-encoding@^0.8.0
- Removedbindings@1.5.0(transitive)
- Removeddetect-character-encoding@0.8.0(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removednan@2.19.0(transitive)