Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: TypeScript #899

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ module.exports = {
commonjs: true,
},
extends: ['eslint:recommended', 'airbnb-base', 'plugin:prettier/recommended'],
plugins: ['prettier'],
parser: '@typescript-eslint/parser',
plugins: ['prettier','@typescript-eslint'],
rules: {
...additionalChanges,
...importRules,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion benchmark/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const assert = require('assert');

const MultipartParser = require('../src/parsers/Multipart');
const MultipartParser = require('../lib/parsers/Multipart');

const parser = new MultipartParser();
const customBoundary = '-----------------------------168072824752491622650073';
Expand Down
2 changes: 1 addition & 1 deletion examples/express-middleware.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express from 'express';
import formidable from '../src/index.js';
import formidable from '../lib/index.js';

const app = express();

Expand Down
2 changes: 1 addition & 1 deletion examples/json.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import http from 'node:http';
import util from 'node:util';
import formidable from '../src/index.js';
import formidable from '../lib/index.js';


const PORT = 3000;
Expand Down
2 changes: 1 addition & 1 deletion examples/log-file-content-to-console.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import http from 'node:http';
import { Writable } from 'node:stream';
import formidable from '../src/index.js';
import formidable from '../lib/index.js';


const server = http.createServer((req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/multipart-parser.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Blob } from 'node:buffer';
import { Readable } from 'node:stream';
import { FormData, formDataToBlob } from 'formdata-polyfill/esm.min.js'
import { MultipartParser } from '../src/index.js';
import { MultipartParser } from '../lib/index.js';

const blob1 = new Blob(
['Content of a.txt.'],
Expand Down
2 changes: 1 addition & 1 deletion examples/multiples.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import http from 'node:http';
import os from 'node:os';
import formidable from '../src/index.js';
import formidable from '../lib/index.js';


const server = http.createServer((req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/store-files-on-s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import http from 'node:http';
import { PassThrough } from 'node:stream';
import AWS from 'aws-sdk';
import formidable from '../src/index.js';
import formidable from '../lib/index.js';


const s3Client = new AWS.S3({
Expand Down
2 changes: 1 addition & 1 deletion examples/upload-multiple-files.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import http from 'node:http';
import util from 'node:util';
import os from 'node:os';
import formidable from '../src/index.js';
import formidable from '../lib/index.js';


const server = http.createServer((req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/urlencoded-no-enctype.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import http from 'node:http';
import util from 'node:util';
import formidable from '../src/index.js';
import formidable from '../lib/index.js';


const server = http.createServer((req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-express.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express from 'express';
import formidable from '../src/index.js';
import formidable from '../lib/index.js';

const app = express();

Expand Down
2 changes: 1 addition & 1 deletion examples/with-http.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import http from 'node:http';
import slugify from '@sindresorhus/slugify';
import formidable, {errors as formidableErrors} from '../src/index.js';
import formidable, {errors as formidableErrors} from '../lib/index.js';

const server = http.createServer((req, res) => {
// handle common internet errors
Expand Down
2 changes: 1 addition & 1 deletion examples/with-koa2.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Koa from 'koa';
import formidable from '../src/index.js';
import formidable from '../lib/index.js';


const app = new Koa();
Expand Down