Skip to content

Commit 1b27107

Browse files
authored
refactor: use explicit node: imports (#786)
* refactor: use explicit node: imports * fix: rename eslint for now
1 parent 9c1ebdc commit 1b27107

30 files changed

+68
-68
lines changed
File renamed without changes.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Parse an incoming file upload, with the
9797
[Node.js's built-in `http` module](https://nodejs.org/api/http.html).
9898

9999
```js
100-
import http from 'http';
100+
import http from 'node:http';
101101
import formidable from 'formidable';
102102

103103
const server = http.createServer((req, res) => {

examples/json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import http from 'http';
1+
import http from 'node:http';
22
import util from 'util';
33
import formidable from '../src/index.js';
44

examples/log-file-content-to-console.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import http from 'http';
2-
import { Writable } from 'stream';
1+
import http from 'node:http';
2+
import { Writable } from 'node:stream';
33
import formidable from '../src/index.js';
44

55

examples/multiples.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import http from 'http';
2-
import os from 'os';
1+
import http from 'node:http';
2+
import os from 'node:os';
33
import formidable from '../src/index.js';
44

55

examples/store-files-on-s3.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// To test this example you have to install aws-sdk nodejs package and create a bucket named "demo-bucket"
22

3-
import http from 'http';
4-
import { PassThrough } from 'stream';
3+
import http from 'node:http';
4+
import { PassThrough } from 'node:stream';
55
import AWS from 'aws-sdk';
66
import formidable from '../src/index.js';
77

examples/upload-multiple-files.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import http from 'http';
2-
import util from 'util';
3-
import os from 'os';
1+
import http from 'node:http';
2+
import util from 'node:util';
3+
import os from 'node:os';
44
import formidable from '../src/index.js';
55

66

examples/urlencoded-no-enctype.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import http from 'http';
2-
import util from 'util';
1+
import http from 'node:http';
2+
import util from 'node:util';
33
import formidable from '../src/index.js';
44

55

examples/with-http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import http from 'http';
1+
import http from 'node:http';
22
import formidable from '../src/index.js';
33

44

src/Formidable.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* eslint-disable class-methods-use-this */
22
/* eslint-disable no-underscore-dangle */
33

4-
import os from 'os';
5-
import path from 'path';
4+
import os from 'node:os';
5+
import path from 'node:path';
6+
import { EventEmitter } from 'node:events';
7+
import { StringDecoder } from 'node:string_decoder';
68
import hexoid from 'hexoid';
79
import once from 'once';
810
import dezalgo from 'dezalgo';
9-
import { EventEmitter } from 'events';
10-
import { StringDecoder } from 'string_decoder';
1111
import { octetstream, querystring, multipart, json } from './plugins/index.js';
1212
import PersistentFile from './PersistentFile.js';
1313
import VolatileFile from './VolatileFile.js';

0 commit comments

Comments
 (0)