Add URL imports for Node.js

This commit is contained in:
yumauri
2021-11-30 20:27:40 +03:00
parent 97d6934bed
commit 9a5a0f3800
11 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
{ {
"path": "pkg/dist-node/index.js", "path": "pkg/dist-node/index.js",
"webpack": false, "webpack": false,
"limit": "4216 B" "limit": "4229 B"
} }
], ],
"@pika/pack": { "@pika/pack": {
+1
View File
@@ -1,3 +1,4 @@
import { URL } from 'url' // tslint:disable-line no-circular-imports
import FormData from 'form-data' import FormData from 'form-data'
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
+1
View File
@@ -1,6 +1,7 @@
import http from 'http' import http from 'http'
import https from 'https' import https from 'https'
import FormData from 'form-data' import FormData from 'form-data'
import { URL } from 'url'
import { GotenbergClientFunction } from '../_types' import { GotenbergClientFunction } from '../_types'
/** /**
+1
View File
@@ -1,3 +1,4 @@
import { URL } from 'url' // tslint:disable-line no-circular-imports
import { client as native } from './client/node' import { client as native } from './client/node'
import { import {
GotenbergClient, GotenbergClient,
+1
View File
@@ -1,3 +1,4 @@
import { URL } from 'url' // tslint:disable-line no-circular-imports
import { Readable } from 'stream' import { Readable } from 'stream'
import { FileURI, ObjectSource, PlainSource, Source, TupleSource } from '../_types' import { FileURI, ObjectSource, PlainSource, Source, TupleSource } from '../_types'
+1 -1
View File
@@ -1,5 +1,5 @@
import { Request, RequestType, UrlRequest } from './_types' import { Request, RequestType, UrlRequest } from './_types'
import { isString, isURL } from './internal/source-checkers' import { isString, isURL } from './internal/source-checkers' // tslint:disable-line no-circular-imports
import { pipe } from './tools/pipe' import { pipe } from './tools/pipe'
import { fields } from './internal/fields' import { fields } from './internal/fields'
import { path } from './internal/path' import { path } from './internal/path'
+1
View File
@@ -1,3 +1,4 @@
import { URL } from 'url'
import { Readable } from 'stream' import { Readable } from 'stream'
import { import {
isBuffer, isBuffer,
+1
View File
@@ -1,3 +1,4 @@
import { URL } from 'url'
import { Readable } from 'stream' import { Readable } from 'stream'
import { basename } from 'path' import { basename } from 'path'
import { createReadStream, ReadStream } from 'fs' import { createReadStream, ReadStream } from 'fs'
+1
View File
@@ -1,3 +1,4 @@
import { URL } from 'url'
import { merge, Request, RequestType } from '../src' import { merge, Request, RequestType } from '../src'
// dumb object to test purity // dumb object to test purity
+1
View File
@@ -1,3 +1,4 @@
import { URL } from 'url'
import { Request, RequestType, url } from '../src' import { Request, RequestType, url } from '../src'
// dumb object to test purity // dumb object to test purity
+1 -1
View File
@@ -2,7 +2,7 @@
"compilerOptions": { "compilerOptions": {
"target": "es2020", "target": "es2020",
"module": "esnext", "module": "esnext",
// "lib": [], // there is problem with URL, when empty :( https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34960 "lib": [], // there is problem with URL, when empty :( https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34960
"moduleResolution": "node", "moduleResolution": "node",
"esModuleInterop": true, "esModuleInterop": true,
"strict": true, "strict": true,