Add URL imports for Node.js
This commit is contained in:
+1
-1
@@ -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,3 +1,4 @@
|
|||||||
|
import { URL } from 'url' // tslint:disable-line no-circular-imports
|
||||||
import FormData from 'form-data'
|
import FormData from 'form-data'
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -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,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,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
@@ -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,3 +1,4 @@
|
|||||||
|
import { URL } from 'url'
|
||||||
import { Readable } from 'stream'
|
import { Readable } from 'stream'
|
||||||
import {
|
import {
|
||||||
isBuffer,
|
isBuffer,
|
||||||
|
|||||||
@@ -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,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,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
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user