atao60 / fse-cli Goto Github PK
View Code? Open in Web Editor NEWA CLI for fs-extra
License: MIT License
A CLI for fs-extra
License: MIT License
I'm using node version v12. so I got this error
error @atao60/[email protected]: The engine "node" is incompatible with this module. Expected version "10.15.3". Got "12.14.0"
error Found incompatible module.
Please provide various node version/
the node_modules folder is unnecessarily added to the npm release of fse-cli, making up 117MB of the 118MB total package size. As a user of fse-cli, you certainly don't need eslint etc. packaged with this module.
run npm install fse-cli [--save-dev]
check size of node_modules/@atao60/fse-cli/node_modules
fse-cli Version:
0.0.29, also tested with 0.0.33
I'm not sure why this isn't ignored for the npm release, because you have node_modules/
added to your .gitignore
, and according to this, npm releases should ignore all files in .gitignore (unless you have a .npmignore).
Maybe try changing node_modules/
to node_modules
?
In our project we have node_modules/
and node_modules/*
in the .gitignore.
Maybe you need to use a module system like webpack? There, you can definitely exclude the node_modules folder, and only package (and minify) the sources and builds necessary for running your module.
1 high severity vulnerability
npm audit report
ansi-regex 5.0.0
Severity: high
Inefficient Regular Expression Complexity in chalk/ansi-regex - GHSA-93q8-gq69-wqmw
freephoenix888@freephoenix888:~/Programming/deep/create-typescript-npm-package-template$ npm i --save-dev @atao60/fse-cli
added 68 packages, and audited 139 packages in 10s
13 packages are looking for funding
run `npm fund` for details
1 high severity vulnerability
To address all issues, run:
npm audit fix
Run `npm audit` for details.
freephoenix888@freephoenix888:~/Programming/deep/create-typescript-npm-package-template$ npm audit fix
up to date, audited 139 packages in 2s
13 packages are looking for funding
run `npm fund` for details
npm audit report
ansi-regex 5.0.0
Severity: high
Inefficient Regular Expression Complexity in chalk/ansi-regex - https://github.com/advisories/GHSA-93q8-gq69-wqmw
fix available via `npm audit fix`
node_modules/@atao60/fse-cli/node_modules/ansi-regex
1 high severity vulnerability
To address all issues, run:
npm audit fix
Operating System:
Linux freephoenix888 5.19.0-42-generic #43~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Apr 21 16:51:08 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
Node.js Version:
v18.14.0
fse-cli Version:
0.1.7
When run on Windows I get the following error: UnhandledPromiseRejectionWarning: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Just run one of the fse commands on Windows via the scripts in package.json
Node Version:
14.16.0
fse-cli Version:
^0.1.6
UnhandledPromiseRejectionWarning: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:782:11)
at Loader.resolve (internal/modules/esm/loader.js:86:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:230:28)
at Loader.import (internal/modules/esm/loader.js:165:28)
at importModuleDynamically (internal/modules/esm/translators.js:114:35)
at exports.importModuleDynamicallyCallback (internal/process/esm_loader.js:30:14)
Right now, some commands write using console.info(). For example, ensureDir:
Checking if existing and, if not, creating directory dist/css ...
Directory dist/css exists.
This output seems a bit redundant.
The equivalent fs-extra command doesn't have any console output.
The most obvious solution (to me) would be to add a --verbose parameter.
Logs should only be shown if that parameter is specified.
Maybe simply remove the console.info() calls?
I need to move files from /dist/src to /dist. This is currently not possible with this command: fse move /dist/src /dist
, because it will warn that 'dest' already exists. If I try to do it with fse move --all /dist/src /dist
nothing happens.
If I don't specify the option --overwrite it should move the files in dist/src to /dist like the Unix mv command does.
writing my own custom script using the native fs module
When emptyDir launched, it fails with an error.
Execute:
npx fse-emptyDir anyFolderExistingOrNot
fse-emptydir
it's not declared but is available in package.json
Node Version:
v12.16.1
fse-cli Version:
"@atao60/fse-cli": "0.0.39",
npx fse-emptyDir ./build
Be gone rapscalian...
(node:49264) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
at Object.readdir (fs.js:846:10)
at go$readdir (/Volumes/Data/swagger-to-angular2/node_modules/@atao60/fse-cli/node_modules/graceful-fs/graceful-fs.js:202:23)
at Object.readdir (/Volumes/Data/swagger-to-angular2/node_modules/@atao60/fse-cli/node_modules/graceful-fs/graceful-fs.js:184:12)
at emptyDir (/Volumes/Data/swagger-to-angular2/node_modules/@atao60/fse-cli/node_modules/fs-extra/lib/empty/index.js:11:6)
at emptyDir (/Volumes/Data/swagger-to-angular2/node_modules/@atao60/fse-cli/node_modules/universalify/index.js:5:57)
at Object.job (/Volumes/Data/swagger-to-angular2/node_modules/@atao60/fse-cli/src/tasks/emptyDir.ts:33:5)
at doit (/Volumes/Data/swagger-to-angular2/node_modules/@atao60/fse-cli/src/wrapper.ts:11:12)
at cli (/Volumes/Data/swagger-to-angular2/node_modules/@atao60/fse-cli/src/cli.ts:6:5)
(node:49264) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:49264) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
fs-extra recently updated 11.0.0 / 2022-11-28
See: https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md
Should be as simple as updating the dependency, api has been kept the same.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.