refactor(trace): remove settle-promise (#815)

This commit is contained in:
Nathan Bierema 2021-08-29 20:15:56 +00:00 committed by GitHub
parent 04c0e2ae00
commit 5ab7cae0de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 16 deletions

View File

@ -32,8 +32,7 @@
"@types/chrome": "^0.0.154",
"anser": "^1.4.10",
"html-entities": "^2.3.2",
"redux-devtools-themes": "^1.0.0",
"settle-promise": "^1.0.0"
"redux-devtools-themes": "^1.0.0"
},
"devDependencies": {
"@redux-devtools/core": "^3.9.0",

View File

@ -8,7 +8,6 @@
import StackFrame from './stack-frame';
import { getSourceMap } from './getSourceMap';
import { getLinesAround } from './getLinesAround';
import { settle } from 'settle-promise';
/**
* Enhances a set of <code>StackFrame</code>s with their original positions and code (when available).
@ -31,7 +30,7 @@ async function map(
}
files.push(fileName);
});
await settle(
await Promise.allSettled(
files.map(async (fileName) => {
const fileSource = await fetch(fileName).then((r) => r.text());
const map = await getSourceMap(fileName, fileSource);

View File

@ -1,3 +0,0 @@
declare module 'settle-promise' {
export function settle(promises: Promise<void>[]): Promise<void>;
}

View File

@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2018",
"target": "es2020",
"module": "commonjs",
"declaration": true,
"strict": true,

View File

@ -5082,7 +5082,6 @@ __metadata:
react-test-renderer: ^16.14.0
redux: ^4.1.1
redux-devtools-themes: ^1.0.0
settle-promise: ^1.0.0
peerDependencies:
"@redux-devtools/inspector-monitor": ^1.0.0
"@types/react": ^16.3.0 || ^17.0.0
@ -26978,13 +26977,6 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"settle-promise@npm:^1.0.0":
version: 1.0.0
resolution: "settle-promise@npm:1.0.0"
checksum: e23f35a9eff783f801dc57b5b57ebeb9170bf8033afa8da0af4107f233da197ac6f2470c8c796d7cbc57c75182f48b8192a463a3fa32fdf00e2cda1d3f2258b3
languageName: node
linkType: hard
"sha.js@npm:^2.4.0, sha.js@npm:^2.4.11, sha.js@npm:^2.4.8":
version: 2.4.11
resolution: "sha.js@npm:2.4.11"