Add URL imports for Node.js
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@
|
||||
{
|
||||
"path": "pkg/dist-node/index.js",
|
||||
"webpack": false,
|
||||
"limit": "4216 B"
|
||||
"limit": "4229 B"
|
||||
}
|
||||
],
|
||||
"@pika/pack": {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { URL } from 'url' // tslint:disable-line no-circular-imports
|
||||
import FormData from 'form-data'
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import http from 'http'
|
||||
import https from 'https'
|
||||
import FormData from 'form-data'
|
||||
import { URL } from 'url'
|
||||
import { GotenbergClientFunction } from '../_types'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { URL } from 'url' // tslint:disable-line no-circular-imports
|
||||
import { client as native } from './client/node'
|
||||
import {
|
||||
GotenbergClient,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { URL } from 'url' // tslint:disable-line no-circular-imports
|
||||
import { Readable } from 'stream'
|
||||
import { FileURI, ObjectSource, PlainSource, Source, TupleSource } from '../_types'
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
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 { fields } from './internal/fields'
|
||||
import { path } from './internal/path'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { URL } from 'url'
|
||||
import { Readable } from 'stream'
|
||||
import {
|
||||
isBuffer,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { URL } from 'url'
|
||||
import { Readable } from 'stream'
|
||||
import { basename } from 'path'
|
||||
import { createReadStream, ReadStream } from 'fs'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { URL } from 'url'
|
||||
import { merge, Request, RequestType } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { URL } from 'url'
|
||||
import { Request, RequestType, url } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"target": "es2020",
|
||||
"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",
|
||||
"esModuleInterop": true,
|
||||
"strict": true,
|
||||
|
||||
Reference in New Issue
Block a user