Coder Social home page Coder Social logo

fse-cli's People

Contributors

atao60 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fse-cli's Issues

node_modules are added to npm release, adding 117MB

๐Ÿž Bug report

Description

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.

๐Ÿ”ฌ Minimal Reproduction

run npm install fse-cli [--save-dev]
check size of node_modules/@atao60/fse-cli/node_modules

๐Ÿ’ปYour Environment

fse-cli Version:

0.0.29, also tested with 0.0.33

Comments

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

๐Ÿž Bug report

Description

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

๐Ÿ”ฌ Minimal Reproduction

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

๐Ÿ’ปYour Environment

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

Empty dir cli not working

๐Ÿž Bug report

Description

When emptyDir launched, it fails with an error.

๐Ÿ”ฌ Minimal Reproduction

Execute:

npx fse-emptyDir anyFolderExistingOrNot

fse-emptydir it's not declared but is available in package.json

๐Ÿ’ปYour Environment

Node Version:

v12.16.1

fse-cli Version:

"@atao60/fse-cli": "0.0.39",

๐Ÿ”ฅ Exception or Error

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.

Unable to use on Windows

๐Ÿž Bug report

Description

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:'

๐Ÿ”ฌ Minimal Reproduction

Just run one of the fse commands on Windows via the scripts in package.json

๐Ÿ’ปYour Environment

Node Version:


14.16.0

fse-cli Version:


^0.1.6

๐Ÿ”ฅ Exception or 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:'
    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)

Remove console output in favor of a --verbose parameter

๐Ÿงฉ Feature request

Description

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.

Describe the solution you'd like

The most obvious solution (to me) would be to add a --verbose parameter.
Logs should only be shown if that parameter is specified.

Alternative solutions

Maybe simply remove the console.info() calls?

The engine "node" is incompatible with this module.

๐Ÿงฉ Feature request

Description

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.

Describe the solution you'd like

Please provide various node version/

Describe alternatives you've considered

Move files from nested folder to parent

๐Ÿงฉ Feature request

Description

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.

Describe the solution you'd like

If I don't specify the option --overwrite it should move the files in dist/src to /dist like the Unix mv command does.

Describe alternatives you've considered

writing my own custom script using the native fs module

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.