Socket
Socket
Sign inDemoInstall

ssg-api

Package Overview
Dependencies
109
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.7.1 to 1.7.2

5

CHANGELOG.md

@@ -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 @@

2

dist/src/util/file/FileUtil.d.ts
/// <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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc