File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99- Upgrade Node.js LTS to v26.4.0 ([ #729 ] ( https://github.com/marp-team/marp-cli/pull/729 ) )
1010- Upgrade dependent packages ([ #729 ] ( https://github.com/marp-team/marp-cli/pull/729 ) )
1111
12+ ### Fixed
13+
14+ - Fix Node.js deprecation warning ` DEP0169 ` (` url.parse() ` ) ([ #730 ] ( https://github.com/marp-team/marp-cli/pull/730 ) )
15+
1216## v4.4.0 - 2026-05-06
1317
1418### Added
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import fs from 'node:fs'
44import { Server as HttpServer } from 'node:http'
55import path from 'node:path'
66import querystring from 'node:querystring'
7- import url from 'node:url'
7+ import { URL } from 'node:url'
88import { promisify } from 'node:util'
99import type { Express , Request , Response } from 'express'
1010import serveIndex from 'serve-index'
@@ -141,10 +141,11 @@ export class Server extends (EventEmitter as new () => TypedEmitter<Server.Event
141141 }
142142
143143 private async preprocess ( req : Request , res : Response ) {
144- const { pathname, query } = url . parse ( req . url )
144+ const requestUrl = new URL ( req . url , 'http://localhost' )
145+ const { pathname } = requestUrl
145146 if ( ! pathname ) return
146147
147- const qs = querystring . parse ( query || '' )
148+ const qs = querystring . parse ( requestUrl . search . slice ( 1 ) )
148149 const response = async ( fn : string ) => {
149150 try {
150151 const { result, type } = await this . convertMarkdown ( fn , qs )
You can’t perform that action at this time.
0 commit comments