mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
remove “abortcontroller-polyfill” (#119308)
This commit is contained in:
parent
ba9dfeafa0
commit
d2d5432c05
5 changed files with 1 additions and 28 deletions
|
@ -189,7 +189,6 @@
|
||||||
"@types/jsonwebtoken": "^8.5.6",
|
"@types/jsonwebtoken": "^8.5.6",
|
||||||
"JSONStream": "1.3.5",
|
"JSONStream": "1.3.5",
|
||||||
"abort-controller": "^3.0.0",
|
"abort-controller": "^3.0.0",
|
||||||
"abortcontroller-polyfill": "^1.7.3",
|
|
||||||
"antlr4ts": "^0.5.0-alpha.3",
|
"antlr4ts": "^0.5.0-alpha.3",
|
||||||
"archiver": "^5.2.0",
|
"archiver": "^5.2.0",
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
|
|
|
@ -34,7 +34,6 @@ RUNTIME_DEPS = [
|
||||||
"@npm//@elastic/eui",
|
"@npm//@elastic/eui",
|
||||||
"@npm//@elastic/numeral",
|
"@npm//@elastic/numeral",
|
||||||
"@npm//@emotion/react",
|
"@npm//@emotion/react",
|
||||||
"@npm//abortcontroller-polyfill",
|
|
||||||
"@npm//babel-loader",
|
"@npm//babel-loader",
|
||||||
"@npm//babel-plugin-transform-react-remove-prop-types",
|
"@npm//babel-plugin-transform-react-remove-prop-types",
|
||||||
"@npm//core-js",
|
"@npm//core-js",
|
||||||
|
@ -74,7 +73,6 @@ TYPES_DEPS = [
|
||||||
"@npm//@elastic/eui",
|
"@npm//@elastic/eui",
|
||||||
"@npm//@elastic/numeral",
|
"@npm//@elastic/numeral",
|
||||||
"@npm//@emotion/react",
|
"@npm//@emotion/react",
|
||||||
"@npm//abortcontroller-polyfill",
|
|
||||||
"@npm//babel-loader",
|
"@npm//babel-loader",
|
||||||
"@npm//core-js",
|
"@npm//core-js",
|
||||||
"@npm//css-loader",
|
"@npm//css-loader",
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
// @ts-ignore not typed
|
|
||||||
import { AbortController } from 'abortcontroller-polyfill/dist/cjs-ponyfill';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple utility function that returns an `AbortSignal` corresponding to an `AbortController`
|
* A simple utility function that returns an `AbortSignal` corresponding to an `AbortController`
|
||||||
|
|
|
@ -64,23 +64,6 @@ export interface ExecutionResult<Output> {
|
||||||
result: Output;
|
result: Output;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* AbortController is not available in Node until v15, so we
|
|
||||||
* need to temporarily mock it for plugins using expressions
|
|
||||||
* on the server.
|
|
||||||
*
|
|
||||||
* TODO: Remove this once Kibana is upgraded to Node 15.
|
|
||||||
*/
|
|
||||||
const getNewAbortController = (): AbortController => {
|
|
||||||
try {
|
|
||||||
return new AbortController();
|
|
||||||
} catch (error) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const polyfill = require('abortcontroller-polyfill/dist/cjs-ponyfill');
|
|
||||||
return new polyfill.AbortController();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const createAbortErrorValue = () =>
|
const createAbortErrorValue = () =>
|
||||||
createError({
|
createError({
|
||||||
message: 'The expression was aborted.',
|
message: 'The expression was aborted.',
|
||||||
|
@ -173,7 +156,7 @@ export class Execution<
|
||||||
/**
|
/**
|
||||||
* AbortController to cancel this Execution.
|
* AbortController to cancel this Execution.
|
||||||
*/
|
*/
|
||||||
private readonly abortController = getNewAbortController();
|
private readonly abortController = new AbortController();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether .start() method has been called.
|
* Whether .start() method has been called.
|
||||||
|
|
|
@ -7062,11 +7062,6 @@ abort-controller@^3.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
event-target-shim "^5.0.0"
|
event-target-shim "^5.0.0"
|
||||||
|
|
||||||
abortcontroller-polyfill@^1.7.3:
|
|
||||||
version "1.7.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz#1b5b487bd6436b5b764fd52a612509702c3144b5"
|
|
||||||
integrity sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==
|
|
||||||
|
|
||||||
accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7:
|
accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7:
|
||||||
version "1.3.7"
|
version "1.3.7"
|
||||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
|
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue