mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
fix(npm): show a progress bar when initializing the node_modules folder (#18136)
Creating the node_modules folder when the packages are already downloaded can take a bit of time and not knowing what is going on can be confusing. It's better to show a progress bar.
This commit is contained in:
parent
e8f22c0765
commit
44b0d4cb11
20 changed files with 256 additions and 165 deletions
43
cli/tests/testdata/npm/cjs_with_deps/main_node_modules.out
vendored
Normal file
43
cli/tests/testdata/npm/cjs_with_deps/main_node_modules.out
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
Download http://localhost:4545/npm/registry/chalk
|
||||
Download http://localhost:4545/npm/registry/chai
|
||||
Download http://localhost:4545/npm/registry/ansi-styles
|
||||
Download http://localhost:4545/npm/registry/supports-color
|
||||
Download http://localhost:4545/npm/registry/assertion-error
|
||||
Download http://localhost:4545/npm/registry/check-error
|
||||
Download http://localhost:4545/npm/registry/deep-eql
|
||||
Download http://localhost:4545/npm/registry/get-func-name
|
||||
Download http://localhost:4545/npm/registry/loupe
|
||||
Download http://localhost:4545/npm/registry/pathval
|
||||
Download http://localhost:4545/npm/registry/type-detect
|
||||
Download http://localhost:4545/npm/registry/color-convert
|
||||
Download http://localhost:4545/npm/registry/has-flag
|
||||
Download http://localhost:4545/npm/registry/color-name
|
||||
Download http://localhost:4545/npm/registry/ansi-styles/ansi-styles-4.3.0.tgz
|
||||
Initialize ansi-styles@4.3.0
|
||||
Download http://localhost:4545/npm/registry/assertion-error/assertion-error-1.1.0.tgz
|
||||
Initialize assertion-error@1.1.0
|
||||
Download http://localhost:4545/npm/registry/chai/chai-4.3.6.tgz
|
||||
Initialize chai@4.3.6
|
||||
Download http://localhost:4545/npm/registry/chalk/chalk-4.1.2.tgz
|
||||
Initialize chalk@4.1.2
|
||||
Download http://localhost:4545/npm/registry/check-error/check-error-1.0.2.tgz
|
||||
Initialize check-error@1.0.2
|
||||
Download http://localhost:4545/npm/registry/color-convert/color-convert-2.0.1.tgz
|
||||
Initialize color-convert@2.0.1
|
||||
Download http://localhost:4545/npm/registry/color-name/color-name-1.1.4.tgz
|
||||
Initialize color-name@1.1.4
|
||||
Download http://localhost:4545/npm/registry/deep-eql/deep-eql-3.0.1.tgz
|
||||
Initialize deep-eql@3.0.1
|
||||
Download http://localhost:4545/npm/registry/get-func-name/get-func-name-2.0.0.tgz
|
||||
Initialize get-func-name@2.0.0
|
||||
Download http://localhost:4545/npm/registry/has-flag/has-flag-4.0.0.tgz
|
||||
Initialize has-flag@4.0.0
|
||||
Download http://localhost:4545/npm/registry/loupe/loupe-2.3.4.tgz
|
||||
Initialize loupe@2.3.4
|
||||
Download http://localhost:4545/npm/registry/pathval/pathval-1.1.1.tgz
|
||||
Initialize pathval@1.1.1
|
||||
Download http://localhost:4545/npm/registry/supports-color/supports-color-7.2.0.tgz
|
||||
Initialize supports-color@7.2.0
|
||||
Download http://localhost:4545/npm/registry/type-detect/type-detect-4.0.8.tgz
|
||||
Initialize type-detect@4.0.8
|
||||
chalk cjs loads
|
26
cli/tests/testdata/npm/cjs_yargs/main.out
vendored
26
cli/tests/testdata/npm/cjs_yargs/main.out
vendored
|
@ -25,30 +25,56 @@ Download http://localhost:4545/npm/registry/p-limit
|
|||
Download http://localhost:4545/npm/registry/color-name
|
||||
Download http://localhost:4545/npm/registry/p-try
|
||||
Download http://localhost:4545/npm/registry/ansi-regex/ansi-regex-5.0.1.tgz
|
||||
Initialize ansi-regex@5.0.1
|
||||
Download http://localhost:4545/npm/registry/ansi-styles/ansi-styles-4.3.0.tgz
|
||||
Initialize ansi-styles@4.3.0
|
||||
Download http://localhost:4545/npm/registry/camelcase/camelcase-5.3.1.tgz
|
||||
Initialize camelcase@5.3.1
|
||||
Download http://localhost:4545/npm/registry/cliui/cliui-6.0.0.tgz
|
||||
Initialize cliui@6.0.0
|
||||
Download http://localhost:4545/npm/registry/color-convert/color-convert-2.0.1.tgz
|
||||
Initialize color-convert@2.0.1
|
||||
Download http://localhost:4545/npm/registry/color-name/color-name-1.1.4.tgz
|
||||
Initialize color-name@1.1.4
|
||||
Download http://localhost:4545/npm/registry/decamelize/decamelize-1.2.0.tgz
|
||||
Initialize decamelize@1.2.0
|
||||
Download http://localhost:4545/npm/registry/emoji-regex/emoji-regex-8.0.0.tgz
|
||||
Initialize emoji-regex@8.0.0
|
||||
Download http://localhost:4545/npm/registry/find-up/find-up-4.1.0.tgz
|
||||
Initialize find-up@4.1.0
|
||||
Download http://localhost:4545/npm/registry/get-caller-file/get-caller-file-2.0.5.tgz
|
||||
Initialize get-caller-file@2.0.5
|
||||
Download http://localhost:4545/npm/registry/is-fullwidth-code-point/is-fullwidth-code-point-3.0.0.tgz
|
||||
Initialize is-fullwidth-code-point@3.0.0
|
||||
Download http://localhost:4545/npm/registry/locate-path/locate-path-5.0.0.tgz
|
||||
Initialize locate-path@5.0.0
|
||||
Download http://localhost:4545/npm/registry/p-limit/p-limit-2.3.0.tgz
|
||||
Initialize p-limit@2.3.0
|
||||
Download http://localhost:4545/npm/registry/p-locate/p-locate-4.1.0.tgz
|
||||
Initialize p-locate@4.1.0
|
||||
Download http://localhost:4545/npm/registry/p-try/p-try-2.2.0.tgz
|
||||
Initialize p-try@2.2.0
|
||||
Download http://localhost:4545/npm/registry/path-exists/path-exists-4.0.0.tgz
|
||||
Initialize path-exists@4.0.0
|
||||
Download http://localhost:4545/npm/registry/require-directory/require-directory-2.1.1.tgz
|
||||
Initialize require-directory@2.1.1
|
||||
Download http://localhost:4545/npm/registry/require-main-filename/require-main-filename-2.0.0.tgz
|
||||
Initialize require-main-filename@2.0.0
|
||||
Download http://localhost:4545/npm/registry/set-blocking/set-blocking-2.0.0.tgz
|
||||
Initialize set-blocking@2.0.0
|
||||
Download http://localhost:4545/npm/registry/string-width/string-width-4.2.3.tgz
|
||||
Initialize string-width@4.2.3
|
||||
Download http://localhost:4545/npm/registry/strip-ansi/strip-ansi-6.0.1.tgz
|
||||
Initialize strip-ansi@6.0.1
|
||||
Download http://localhost:4545/npm/registry/which-module/which-module-2.0.0.tgz
|
||||
Initialize which-module@2.0.0
|
||||
Download http://localhost:4545/npm/registry/wrap-ansi/wrap-ansi-6.2.0.tgz
|
||||
Initialize wrap-ansi@6.2.0
|
||||
Download http://localhost:4545/npm/registry/y18n/y18n-4.0.3.tgz
|
||||
Initialize y18n@4.0.3
|
||||
Download http://localhost:4545/npm/registry/yargs/yargs-15.4.1.tgz
|
||||
Initialize yargs@15.4.1
|
||||
Download http://localhost:4545/npm/registry/yargs-parser/yargs-parser-18.1.3.tgz
|
||||
Initialize yargs-parser@18.1.3
|
||||
start server on :8000
|
||||
[WILDCARD]
|
||||
|
|
18
cli/tests/testdata/npm/conditional_exports/main_node_modules.out
vendored
Normal file
18
cli/tests/testdata/npm/conditional_exports/main_node_modules.out
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
Download http://localhost:4545/npm/registry/@denotest/conditional-exports
|
||||
Download http://localhost:4545/npm/registry/supports-esm
|
||||
Download http://localhost:4545/npm/registry/has-package-exports
|
||||
Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns
|
||||
Download http://localhost:4545/npm/registry/@denotest/conditional-exports/1.0.0.tgz
|
||||
Initialize @denotest/conditional-exports@1.0.0
|
||||
Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.2.tgz
|
||||
Initialize @ljharb/has-package-exports-patterns@0.0.2
|
||||
Download http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.3.0.tgz
|
||||
Initialize has-package-exports@1.3.0
|
||||
Download http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz
|
||||
Initialize supports-esm@1.0.0
|
||||
{ hello: "from esm" }
|
||||
{ hello: "from foo" }
|
||||
{ hello: "from esm client" }
|
||||
{ hello: "from esm client foo" }
|
||||
{ hello: "from esm client bar" }
|
||||
true
|
|
@ -1,7 +1,9 @@
|
|||
Download http://localhost:4545/npm/registry/@denotest/MixedCase
|
||||
Download http://localhost:4545/npm/registry/@denotest/CAPITALS
|
||||
Download http://localhost:4545/npm/registry/@denotest/CAPITALS/1.0.0.tgz
|
||||
Initialize @denotest/CAPITALS@1.0.0
|
||||
Download http://localhost:4545/npm/registry/@denotest/MixedCase/1.0.0.tgz
|
||||
Initialize @denotest/MixedCase@1.0.0
|
||||
5
|
||||
true
|
||||
true
|
||||
|
|
7
cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules.out
vendored
Normal file
7
cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules.out
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
Initialize @denotest/peer-dep-test-child@1.0.0
|
||||
Initialize @denotest/peer-dep-test-child@2.0.0
|
||||
Initialize @denotest/peer-dep-test-grandchild@1.0.0
|
||||
Initialize @denotest/peer-dep-test-peer@1.0.0
|
||||
Initialize @denotest/peer-dep-test-peer@2.0.0
|
||||
1
|
||||
2
|
15
cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules_reload.out
vendored
Normal file
15
cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules_reload.out
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-child
|
||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-grandchild
|
||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer
|
||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-child/1.0.0.tgz
|
||||
Initialize @denotest/peer-dep-test-child@1.0.0
|
||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-child/2.0.0.tgz
|
||||
Initialize @denotest/peer-dep-test-child@2.0.0
|
||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-grandchild/1.0.0.tgz
|
||||
Initialize @denotest/peer-dep-test-grandchild@1.0.0
|
||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer/1.0.0.tgz
|
||||
Initialize @denotest/peer-dep-test-peer@1.0.0
|
||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer/2.0.0.tgz
|
||||
Initialize @denotest/peer-dep-test-peer@2.0.0
|
||||
1
|
||||
2
|
Loading…
Add table
Add a link
Reference in a new issue