marp-team / marp-cli

A CLI interface for Marp and Marpit based converters
MIT License
1.84k stars 105 forks source link

The `punycode` module is deprecated. #574

Open spkane opened 4 months ago

spkane commented 4 months ago

Version of Marp Tool

@marp-team/marp-cli v3.4.0 (w/ @marp-team/marp-core v3.9.0)

Operating System

macOS

Environment

How to reproduce

I have been getting these TWO deprecation warnings for a longtime. Everything appears to work, but I'd really like to remove the constant warnings if at all possible. Is there a way to update/modify things to fix this?

$ node --trace-deprecation /opt/homebrew/bin/marp class-docker-4-weeks-day1.md  --theme-set ./marp-themes/techlabs.css --html --allow-local-files

(node:4773) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:398:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:337:10)
    at loadBuiltinModule (node:internal/modules/helpers:104:7)
    at Module._load (node:internal/modules/cjs/loader:1075:17)
    at Module.require (node:internal/modules/cjs/loader:1310:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/node_modules/markdown-it/lib/index.js:14:20)
    at Module._compile (node:internal/modules/cjs/loader:1480:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1564:10)
(node:4773) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
    at Lt (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:47181)
    at Wt (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:52121)
    at qt (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:52774)
    at Zt (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:55413)
    at /opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:60115
    at An._silentImport (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:60245)
    at async An.resolveModule (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:59192)
    at async An.resolve (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:58644)
    at async An.resolveDefaultEngine (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:58763)
    at async fromArguments (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:43:101040)
[  INFO ] Converting 1 markdown...
[  INFO ] class-docker-4-weeks-day1.md => class-docker-4-weeks-day1.html

Expected behavior

$ marp class-docker-4-weeks-day1.md  --theme-set ./marp-themes/techlabs.css --html --allow-local-files
[  INFO ] Converting 1 markdown...
[  INFO ] class-docker-4-weeks-day1.md => class-docker-4-weeks-day1.html

Actual behavior

$ marp class-docker-4-weeks-day1.md  --theme-set ./marp-themes/techlabs.css --html --allow-local-files
(node:5156) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:5156) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
[  INFO ] Converting 1 markdown...
[  INFO ] class-docker-4-weeks-day1.md => class-docker-4-weeks-day1.html

Additional information

No response

yhatt commented 4 months ago

https://github.com/markdown-it/markdown-it/issues/967

spkane commented 3 months ago

Is the markdown-it issue also causing the DeprecationWarning for fs.Stats constructor?

yhatt commented 3 months ago

In anywhere of Marp CLI codes, fs.Stats is not used as the constructor. Probably it comes from external JavaScript dependencies. Pull request is welcome.