8000 cleandup some unnecessary dependency · pyscript/polyscript@7ac89e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7ac89e7

Browse files
committed
cleandup some unnecessary dependency
1 parent 9da0057
8000
 commit 7ac89e7

File tree

9 files changed

+13
-25
lines changed

9 files changed

+13
-25
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ The module is registered within the interpreter as *JS* module and it offers var
381381
| js_modules | `from polyscript import js_modules` | described in the [Extra config Features](#extra-config-features) part. |
382382
| lazy_py_modules | `from polyscript import lazy_py_modules` | allows, only in *Python* related interpreters, and without needing static config entries, to import lazily any available module.
383383
| storage | `from polyscript import storage` | a utility to instantiate a named [idb-map](https://github.com/WebReflection/idb-map/#readme) that can be consumed synchronously.
384-
| JSON | `from polyscript import JSON` | a utility to stringify/parse more complex or recursive data via [@ungap/structured-clone/json](https://github.com/ungap/structured-clone/#readme).
384+
| JSON | `from polyscript import JSON` | a utility to stringify/parse more complex or recursive data.
385385
386386
387387
#### lazy_py_modules

docs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/custom.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@ungap/with-resolvers';
1+
import withResolvers from '@webreflection/utils/with-resolvers';
22
import { $$ } from 'basic-devtools';
33

44
import IDBMap from '@webreflection/idb-map';
@@ -279,7 +279,7 @@ export const define = (type, options) => {
279279
* @returns {Promise<object>}
280280
*/
281281
export const whenDefined = (type) => {
282-
if (!waitList.has(type)) waitList.set(type, Promise.withResolvers());
282+
if (!waitList.has(type)) waitList.set(type, withResolvers());
283283
return waitList.get(type).promise;
284284
};
285285
/* c8 ignore stop */

esm/interpreter/_utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import '@ungap/with-resolvers';
21
import fetch from '@webreflection/fetch';
32

43
import { absoluteURL, all, entries, importCSS, importJS, isArray, isCSS } from '../utils.js';

esm/worker/class.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import withResolvers from '@webreflection/utils/with-resolvers';
12
import fetch from '@webreflection/fetch';
23
import xworker from './xworker.js';
34
import { getConfigURLAndType } from '../loader.js';
@@ -45,7 +46,7 @@ export default (...args) =>
4546
{ importJS, importCSS },
4647
);
4748

48-
const resolver = Promise.withResolvers();
49+
const resolver = withResolvers();
4950

5051
let bootstrap = fetch(url)
5152
.text()

esm/workers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import withResolvers from '@webreflection/utils/with-resolvers';
2+
13
// REQUIRES INTEGRATION TEST
24
/* c8 ignore start */
35
export const workers = new Proxy(new Map, {
46
get(map, name) {
57
if (!map.has(name))
6-
map.set(name, Promise.withResolvers());
8+
map.set(name, withResolvers());
79
return map.get(name);
810
},
911
});

package-lock.json

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,9 @@
8383
"./package.json": "./package.json"
8484
},
8585
"dependencies": {
86-
"@ungap/structured-clone": "^1.3.0",
87-
"@ungap/with-resolvers": "^0.1.0",
8886
"@webreflection/fetch": "^0.1.5",
8987
"@webreflection/idb-map": "^0.3.2",
88+
"@webreflection/utils": "^0.1.0",
9089
"basic-devtools": "^0.1.6",
9190
"codedent": "^0.1.2",
9291
"coincident": "^3.0.2",
@@ -97,6 +96,6 @@
9796
"to-json-callback": "^0.1.1"
9897
},
9998
"worker": {
100-
"blob": "sha256-4cbYgQH1cfwMhG6Edre6Zo+y7y06Y7QKic9wfGdbArk="
99+
"blob": "sha256-RhDxs4QsJEd24AV/rjPw9JHF89fX76osOSS31nPcaRU="
101100
}
102101
}

0 commit comments

Comments
 (0)
0