Compare commits

..

8 Commits

Author SHA1 Message Date
b3f6b8db6a 3.0.3 2022-03-25 00:04:24 +01:00
ce9d02562f fix(core): update 2022-03-25 00:04:24 +01:00
e9e974e696 3.0.2 2022-03-24 13:20:35 +01:00
ee361eba4d fix(core): update 2022-03-24 13:20:35 +01:00
1d14312ccc 3.0.1 2022-03-16 16:34:55 +01:00
09ac10c27c fix(core): update 2022-03-16 16:34:55 +01:00
4b7a9d97f3 3.0.0 2022-03-16 16:26:31 +01:00
2dfd75aaea BREAKING CHANGE(core): switch to esm 2022-03-16 16:26:30 +01:00
3 changed files with 860 additions and 833 deletions

1651
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/webrequest", "name": "@pushrocks/webrequest",
"version": "2.0.16", "version": "3.0.3",
"private": false, "private": false,
"description": "securely request from browsers", "description": "securely request from browsers",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -10,16 +10,15 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/ --web)", "test": "(tstest test/ --web)",
"build": "(tsbuild --web && tsbundle npm)", "build": "(tsbuild --web --allowimplicitany && tsbundle npm)"
"format": "(gitzone format)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.56", "@gitzone/tsbuild": "^2.1.61",
"@gitzone/tsbundle": "^1.0.98", "@gitzone/tsbundle": "^1.0.101",
"@gitzone/tstest": "^1.0.68", "@gitzone/tstest": "^1.0.69",
"@pushrocks/smartexpress": "^3.0.108", "@pushrocks/smartexpress": "^4.0.1",
"@pushrocks/tapbundle": "^5.0.2", "@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^17.0.21", "@types/node": "^17.0.23",
"tslint": "^6.1.3", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },

View File

@ -14,7 +14,8 @@ export class WebRequest {
const smartenv = new plugins.smartenv.Smartenv(); const smartenv = new plugins.smartenv.Smartenv();
if (!smartenv.isBrowser) { if (!smartenv.isBrowser) {
this.polyfillStatusEvaluated = true; this.polyfillStatusEvaluated = true;
await smartenv.getSafeNodeModule('node-fetch'); const fetch = await smartenv.getSafeNodeModule('node-fetch');
globalThis.fetch = fetch.default;
} }
this.neededPolyfillsLoadedDeferred.resolve(); this.neededPolyfillsLoadedDeferred.resolve();
} }