From 6d30d28f2efc459ed124d47e8140de04a0d2c0d3 Mon Sep 17 00:00:00 2001 From: Zyie <24736175+Zyie@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:09:04 +0100 Subject: [PATCH 1/2] fix fs --- packages/spine/src/spineAtlasCacheBuster.ts | 6 +++--- packages/spine/src/spineAtlasManifestMod.ts | 6 +++--- packages/texture-packer/src/texturePackerCacheBuster.ts | 6 +++--- packages/texture-packer/src/texturePackerManifestMod.ts | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/spine/src/spineAtlasCacheBuster.ts b/packages/spine/src/spineAtlasCacheBuster.ts index 90bdcc9..7e3ac9c 100644 --- a/packages/spine/src/spineAtlasCacheBuster.ts +++ b/packages/spine/src/spineAtlasCacheBuster.ts @@ -1,4 +1,4 @@ -import { removeSync, writeFileSync } from 'fs-extra'; +import fs from 'fs-extra'; import { AtlasView } from './AtlasView'; import { type AssetPipe, checkExt, findAssets } from '@play-co/assetpack-core'; @@ -72,10 +72,10 @@ export function spineAtlasCacheBuster(): AssetPipe atlasAsset.path = atlasAsset.path.replace(originalHash, atlasAsset.hash); - removeSync(originalPath); + fs.removeSync(originalPath); // rewrite.. - writeFileSync(atlasAsset.path, atlasAsset.buffer); + fs.writeFileSync(atlasAsset.path, atlasAsset.buffer); }); atlasFileToFix.length = 0; diff --git a/packages/spine/src/spineAtlasManifestMod.ts b/packages/spine/src/spineAtlasManifestMod.ts index 896eebd..cb76e1a 100644 --- a/packages/spine/src/spineAtlasManifestMod.ts +++ b/packages/spine/src/spineAtlasManifestMod.ts @@ -1,4 +1,4 @@ -import { readJsonSync, writeJSONSync } from 'fs-extra'; +import fs from 'fs-extra'; import { AtlasView } from './AtlasView'; import { type AssetPipe, findAssets, path } from '@play-co/assetpack-core'; @@ -50,7 +50,7 @@ export function spineAtlasManifestMod(_options: SpineManifestOptions = {}): Asse const newFileName = path.dirname(manifestLocation) === '.' ? path.joinSafe(pipeSystem.outputPath, manifestLocation) : manifestLocation; - const manifest = readJsonSync(newFileName); + const manifest = fs.readJsonSync(newFileName); atlasAssets.forEach((atlasAsset) => { @@ -65,7 +65,7 @@ export function spineAtlasManifestMod(_options: SpineManifestOptions = {}): Asse }); }); - writeJSONSync(newFileName, manifest, { spaces: 2 }); + fs.writeJSONSync(newFileName, manifest, { spaces: 2 }); } }; } diff --git a/packages/texture-packer/src/texturePackerCacheBuster.ts b/packages/texture-packer/src/texturePackerCacheBuster.ts index 4d3725d..5948e03 100644 --- a/packages/texture-packer/src/texturePackerCacheBuster.ts +++ b/packages/texture-packer/src/texturePackerCacheBuster.ts @@ -1,4 +1,4 @@ -import { removeSync, writeFileSync } from 'fs-extra'; +import fs from 'fs-extra'; import { type AssetPipe, checkExt, findAssets } from '@play-co/assetpack-core'; import type { Asset } from '@play-co/assetpack-core'; @@ -70,10 +70,10 @@ export function texturePackerCacheBuster(): AssetPipe jsonAsset.path = jsonAsset.path.replace(originalHash, jsonAsset.hash); - removeSync(originalPath); + fs.removeSync(originalPath); // rewrite.. - writeFileSync(jsonAsset.path, jsonAsset.buffer); + fs.writeFileSync(jsonAsset.path, jsonAsset.buffer); }); textureJsonFilesToFix.length = 0; diff --git a/packages/texture-packer/src/texturePackerManifestMod.ts b/packages/texture-packer/src/texturePackerManifestMod.ts index 5c83dc5..954ca7b 100644 --- a/packages/texture-packer/src/texturePackerManifestMod.ts +++ b/packages/texture-packer/src/texturePackerManifestMod.ts @@ -1,4 +1,4 @@ -import { existsSync, readJsonSync, writeJSONSync } from 'fs-extra'; +import fs from 'fs-extra'; import { type AssetPipe, findAssets, path } from '@play-co/assetpack-core'; import type { Asset } from '@play-co/assetpack-core'; @@ -49,7 +49,7 @@ export function texturePackerManifestMod( const newFileName = path.dirname(manifestLocation) === '.' ? path.joinSafe(pipeSystem.outputPath, manifestLocation) : manifestLocation; - if (!existsSync(newFileName)) + if (!fs.existsSync(newFileName)) { // eslint-disable-next-line max-len console.warn(`[Assetpack] Texture Packer Manifest could not find the manifest: ${newFileName}. Please ensure that the 'pixiManifest' output and the 'texturePackerManifest' output are the same.`); @@ -57,7 +57,7 @@ export function texturePackerManifestMod( return; } - const manifest = readJsonSync(newFileName); + const manifest = fs.readJsonSync(newFileName); // used to make sure we don't process the same asset twice. const duplicateHash: Record = {}; @@ -102,7 +102,7 @@ export function texturePackerManifestMod( }); // write the new manifest. - writeJSONSync(newFileName, manifest, { spaces: 2 }); + fs.writeJSONSync(newFileName, manifest, { spaces: 2 }); return; } From 63bb018a5b4bee30ff3bef90dc42289166619a26 Mon Sep 17 00:00:00 2001 From: Zyie <24736175+Zyie@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:09:34 +0100 Subject: [PATCH 2/2] v1.4.1 --- lerna.json | 2 +- package-lock.json | 46 ++++++++++++++-------------- packages/cache-buster/package.json | 4 +-- packages/cli/package.json | 2 +- packages/core/package.json | 2 +- packages/ffmpeg/package.json | 6 ++-- packages/image/package.json | 4 +-- packages/json/package.json | 4 +-- packages/manifest/package.json | 4 +-- packages/spine/package.json | 8 ++--- packages/texture-packer/package.json | 8 ++--- packages/webfont/package.json | 4 +-- 12 files changed, 47 insertions(+), 47 deletions(-) diff --git a/lerna.json b/lerna.json index 01a806d..68b5be6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,7 +1,7 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", "useWorkspaces": true, - "version": "1.4.0", + "version": "1.4.1", "command": { "publish": { "graphType": "all" diff --git a/package-lock.json b/package-lock.json index 2e45afb..29aaf34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17506,13 +17506,13 @@ }, "packages/cache-buster": { "name": "@play-co/assetpack-plugin-cache-buster", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "fs-extra": "^11.1.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0" + "@play-co/assetpack-core": "1.4.1" }, "engines": { "node": ">=16.0.0" @@ -17523,7 +17523,7 @@ }, "packages/cli": { "name": "@play-co/assetpack-cli", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "chalk": "^4.1.2", @@ -17550,7 +17550,7 @@ }, "packages/core": { "name": "@play-co/assetpack-core", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "@node-rs/crc32": "^1.10.0", @@ -17599,7 +17599,7 @@ }, "packages/ffmpeg": { "name": "@play-co/assetpack-plugin-ffmpeg", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "@ffmpeg-installer/ffmpeg": "^1.1.0", @@ -17608,8 +17608,8 @@ "fs-extra": "^11.1.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0", - "@play-co/assetpack-plugin-manifest": "1.4.0" + "@play-co/assetpack-core": "1.4.1", + "@play-co/assetpack-plugin-manifest": "1.4.1" }, "engines": { "node": ">=16.0.0" @@ -17621,14 +17621,14 @@ }, "packages/image": { "name": "@play-co/assetpack-plugin-image", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "fs-extra": "^11.1.0", "sharp": "^0.33.3" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0" + "@play-co/assetpack-core": "1.4.1" }, "engines": { "node": ">=16.0.0" @@ -17639,13 +17639,13 @@ }, "packages/json": { "name": "@play-co/assetpack-plugin-json", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "fs-extra": "^11.1.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0" + "@play-co/assetpack-core": "1.4.1" }, "engines": { "node": ">=16.0.0" @@ -17656,14 +17656,14 @@ }, "packages/manifest": { "name": "@play-co/assetpack-plugin-manifest", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "fs-extra": "^11.1.0", "upath": "^2.0.1" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0" + "@play-co/assetpack-core": "1.4.1" }, "engines": { "node": ">=16.0.0" @@ -17674,15 +17674,15 @@ }, "packages/spine": { "name": "@play-co/assetpack-plugin-spine", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "fs-extra": "^11.1.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0", - "@play-co/assetpack-plugin-image": "1.4.0", - "@play-co/assetpack-plugin-manifest": "1.4.0" + "@play-co/assetpack-core": "1.4.1", + "@play-co/assetpack-plugin-image": "1.4.1", + "@play-co/assetpack-plugin-manifest": "1.4.1" }, "engines": { "node": ">=16.0.0" @@ -17694,7 +17694,7 @@ }, "packages/texture-packer": { "name": "@play-co/assetpack-plugin-texture-packer", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "fs-extra": "^11.1.0", @@ -17704,9 +17704,9 @@ "sharp": "^0.33.3" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0", - "@play-co/assetpack-plugin-image": "1.4.0", - "@play-co/assetpack-plugin-manifest": "1.4.0" + "@play-co/assetpack-core": "1.4.1", + "@play-co/assetpack-plugin-image": "1.4.1", + "@play-co/assetpack-plugin-manifest": "1.4.1" }, "engines": { "node": ">=16.0.0" @@ -17773,7 +17773,7 @@ }, "packages/webfont": { "name": "@play-co/assetpack-plugin-webfont", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "fs-extra": "^11.1.0", @@ -17783,7 +17783,7 @@ "ttf2woff2": "^5.0.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0", + "@play-co/assetpack-core": "1.4.1", "@types/svg2ttf": "^5.0.1", "@types/ttf2woff2": "^2.0.0" }, diff --git a/packages/cache-buster/package.json b/packages/cache-buster/package.json index 94e610c..8331646 100644 --- a/packages/cache-buster/package.json +++ b/packages/cache-buster/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-plugin-cache-buster", - "version": "1.4.0", + "version": "1.4.1", "description": "", "homepage": "https://github.com/pixijs/assetpack/tree/master/packages/cache-buster/#readme", "bugs": "https://github.com/pixijs/assetpack/issues", @@ -32,7 +32,7 @@ "fs-extra": "^11.1.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0" + "@play-co/assetpack-core": "1.4.1" }, "peerDependencies": { "@play-co/assetpack-core": ">=0.0.0" diff --git a/packages/cli/package.json b/packages/cli/package.json index c2be7fe..ac329e8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-cli", - "version": "1.4.0", + "version": "1.4.1", "description": "A simple CLI to run AssetPack", "keywords": [ "assetpack", diff --git a/packages/core/package.json b/packages/core/package.json index 8e2eaf3..892e877 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-core", - "version": "1.4.0", + "version": "1.4.1", "description": "", "homepage": "https://github.com/pixijs/assetpack/tree/master/packages/core/#readme", "bugs": "https://github.com/pixijs/assetpack/issues", diff --git a/packages/ffmpeg/package.json b/packages/ffmpeg/package.json index 92d67ad..d5e35b7 100644 --- a/packages/ffmpeg/package.json +++ b/packages/ffmpeg/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-plugin-ffmpeg", - "version": "1.4.0", + "version": "1.4.1", "description": "", "homepage": "https://github.com/pixijs/assetpack/tree/master/packages/ffmpeg/#readme", "bugs": "https://github.com/pixijs/assetpack/issues", @@ -35,8 +35,8 @@ "fs-extra": "^11.1.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0", - "@play-co/assetpack-plugin-manifest": "1.4.0" + "@play-co/assetpack-core": "1.4.1", + "@play-co/assetpack-plugin-manifest": "1.4.1" }, "peerDependencies": { "@play-co/assetpack-core": ">=0.0.0", diff --git a/packages/image/package.json b/packages/image/package.json index 7aa7bc0..63bc48e 100644 --- a/packages/image/package.json +++ b/packages/image/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-plugin-image", - "version": "1.4.0", + "version": "1.4.1", "description": "", "homepage": "https://github.com/pixijs/assetpack/tree/master/packages/image/#readme", "bugs": "https://github.com/pixijs/assetpack/issues", @@ -33,7 +33,7 @@ "sharp": "^0.33.3" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0" + "@play-co/assetpack-core": "1.4.1" }, "peerDependencies": { "@play-co/assetpack-core": ">=0.0.0" diff --git a/packages/json/package.json b/packages/json/package.json index 0f1e47f..41eac9e 100644 --- a/packages/json/package.json +++ b/packages/json/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-plugin-json", - "version": "1.4.0", + "version": "1.4.1", "description": "", "homepage": "https://github.com/pixijs/assetpack/tree/master/packages/json/#readme", "bugs": "https://github.com/pixijs/assetpack/issues", @@ -32,7 +32,7 @@ "fs-extra": "^11.1.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0" + "@play-co/assetpack-core": "1.4.1" }, "peerDependencies": { "@play-co/assetpack-core": ">=0.0.0" diff --git a/packages/manifest/package.json b/packages/manifest/package.json index e3d7e58..01ad947 100644 --- a/packages/manifest/package.json +++ b/packages/manifest/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-plugin-manifest", - "version": "1.4.0", + "version": "1.4.1", "description": "", "homepage": "https://github.com/pixijs/assetpack/tree/master/packages/manifest/#readme", "bugs": "https://github.com/pixijs/assetpack/issues", @@ -33,7 +33,7 @@ "upath": "^2.0.1" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0" + "@play-co/assetpack-core": "1.4.1" }, "peerDependencies": { "@play-co/assetpack-core": ">=0.0.0" diff --git a/packages/spine/package.json b/packages/spine/package.json index f30966b..5fd648c 100644 --- a/packages/spine/package.json +++ b/packages/spine/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-plugin-spine", - "version": "1.4.0", + "version": "1.4.1", "description": "", "homepage": "https://github.com/pixijs/assetpack/tree/master/packages/cache-buster/#readme", "bugs": "https://github.com/pixijs/assetpack/issues", @@ -32,9 +32,9 @@ "fs-extra": "^11.1.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0", - "@play-co/assetpack-plugin-image": "1.4.0", - "@play-co/assetpack-plugin-manifest": "1.4.0" + "@play-co/assetpack-core": "1.4.1", + "@play-co/assetpack-plugin-image": "1.4.1", + "@play-co/assetpack-plugin-manifest": "1.4.1" }, "peerDependencies": { "@play-co/assetpack-core": ">=0.0.0", diff --git a/packages/texture-packer/package.json b/packages/texture-packer/package.json index e2abc63..91e7301 100644 --- a/packages/texture-packer/package.json +++ b/packages/texture-packer/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-plugin-texture-packer", - "version": "1.4.0", + "version": "1.4.1", "description": "", "homepage": "https://github.com/pixijs/assetpack/tree/master/packages/texture-packer/#readme", "bugs": "https://github.com/pixijs/assetpack/issues", @@ -36,9 +36,9 @@ "sharp": "^0.33.3" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0", - "@play-co/assetpack-plugin-image": "1.4.0", - "@play-co/assetpack-plugin-manifest": "1.4.0" + "@play-co/assetpack-core": "1.4.1", + "@play-co/assetpack-plugin-image": "1.4.1", + "@play-co/assetpack-plugin-manifest": "1.4.1" }, "peerDependencies": { "@play-co/assetpack-core": ">=0.0.0", diff --git a/packages/webfont/package.json b/packages/webfont/package.json index 45fe589..8449d87 100644 --- a/packages/webfont/package.json +++ b/packages/webfont/package.json @@ -1,6 +1,6 @@ { "name": "@play-co/assetpack-plugin-webfont", - "version": "1.4.0", + "version": "1.4.1", "description": "", "homepage": "https://github.com/pixijs/assetpack/tree/master/packages/webfont/#readme", "bugs": "https://github.com/pixijs/assetpack/issues", @@ -36,7 +36,7 @@ "ttf2woff2": "^5.0.0" }, "devDependencies": { - "@play-co/assetpack-core": "1.4.0", + "@play-co/assetpack-core": "1.4.1", "@types/svg2ttf": "^5.0.1", "@types/ttf2woff2": "^2.0.0" },