Skip to content

Commit 038b7a1

Browse files
committed
refactor: prefix built-in node module imports
Align with changes introduced in expressjs/express#6236 by prefixing all built-in Node.js module imports with 'node:'. Reference: expressjs/express#6236
1 parent ee8bd68 commit 038b7a1

File tree

7 files changed

+19
-14
lines changed

7 files changed

+19
-14
lines changed

HISTORY.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
unreleased
2+
========================
3+
4+
* refactor: prefix built-in node module imports
5+
16
2.0.2 / 2024-10-31
27
=========================
38

lib/read.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var destroy = require('destroy')
1616
var getBody = require('raw-body')
1717
var iconv = require('iconv-lite')
1818
var onFinished = require('on-finished')
19-
var zlib = require('zlib')
19+
var zlib = require('node:zlib')
2020

2121
/**
2222
* Module exports.

test/body-parser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
var assert = require('assert')
3+
var assert = require('node:assert')
44

55
var bodyParser = require('..')
66

test/json.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict'
22

3-
var assert = require('assert')
4-
var AsyncLocalStorage = require('async_hooks').AsyncLocalStorage
5-
var http = require('http')
3+
var assert = require('node:assert')
4+
var AsyncLocalStorage = require('node:async_hooks').AsyncLocalStorage
5+
var http = require('node:http')
66
var request = require('supertest')
77

88
var bodyParser = require('..')

test/raw.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict'
22

3-
var assert = require('assert')
4-
var AsyncLocalStorage = require('async_hooks').AsyncLocalStorage
5-
var http = require('http')
3+
var assert = require('node:assert')
4+
var AsyncLocalStorage = require('node:async_hooks').AsyncLocalStorage
5+
var http = require('node:http')
66
var request = require('supertest')
77

88
var bodyParser = require('..')

test/text.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict'
22

3-
var assert = require('assert')
4-
var AsyncLocalStorage = require('async_hooks').AsyncLocalStorage
5-
var http = require('http')
3+
var assert = require('node:assert')
4+
var AsyncLocalStorage = require('node:async_hooks').AsyncLocalStorage
5+
var http = require('node:http')
66
var request = require('supertest')
77

88
var bodyParser = require('..')

test/urlencoded.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict'
22

3-
var assert = require('assert')
4-
var AsyncLocalStorage = require('async_hooks').AsyncLocalStorage
5-
var http = require('http')
3+
var assert = require('node:assert')
4+
var AsyncLocalStorage = require('node:async_hooks').AsyncLocalStorage
5+
var http = require('node:http')
66
var request = require('supertest')
77

88
var bodyParser = require('..')

0 commit comments

Comments
 (0)