From f8df4bb92037f3599a6f8e78d50b3f363d2eafc6 Mon Sep 17 00:00:00 2001 From: wessberg Date: Thu, 20 Sep 2018 23:25:02 +0200 Subject: [PATCH] feat: Added support for 'requestidlecallback' --- README.md | 1 + package.json | 19 ++++++++++--------- src/constant/constant.ts | 7 +++++++ src/environment/environment-defaults.ts | 1 + src/polyfill/polyfill-name.ts | 1 + 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 20719ec..0910018 100644 --- a/README.md +++ b/README.md @@ -470,6 +470,7 @@ And, if you request `performance.now`, `date.now` will also be included since th - performance.now - blob - requestanimationframe +- requestidlecallback - url - base64 - xhr diff --git a/package.json b/package.json index 2a2aeaf..a1831d0 100644 --- a/package.json +++ b/package.json @@ -45,26 +45,26 @@ "polyfills-as-a-service" ], "devDependencies": { - "@wessberg/rollup-plugin-di": "^1.0.86", - "@wessberg/scaffold": "^1.0.1", + "@wessberg/rollup-plugin-di": "^1.0.87", + "@wessberg/scaffold": "^1.0.4", "@wessberg/ts-config": "^0.0.30", "conventional-changelog-cli": "^2.0.5", "husky": "latest", - "rollup": "^0.65.2", + "rollup": "^0.66.1", "tslint": "^5.11.0", "typescript": "^3.0.3", "useragent-generator": "^1.1.0" }, "dependencies": { - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", + "@babel/core": "^7.1.0", + "@babel/preset-env": "^7.1.0", "@babel/preset-stage-3": "^7.0.0", - "@babel/preset-typescript": "^7.0.0", + "@babel/preset-typescript": "^7.1.0", "@types/file-type": "^5.2.1", "@types/iltorb": "^2.3.0", - "@types/memory-fs": "^0.3.1", + "@types/memory-fs": "^0.3.2", "@types/mime": "^2.0.0", - "@types/node": "^10.9.4", + "@types/node": "^10.10.1", "@types/semver": "^5.5.0", "@webcomponents/custom-elements": "^1.2.0", "@webcomponents/shadydom": "^1.2.0", @@ -100,6 +100,7 @@ "proxy-polyfill": "^0.3.0", "regenerator-runtime": "^0.12.1", "requestanimationframe": "0.0.23", + "requestidlecallback": "^0.3.0", "semver": "^5.5.1", "systemjs": "^0.21.4", "temp-dir": "^1.0.0", @@ -107,7 +108,7 @@ "tslib": "^1.9.3", "url-polyfill": "^1.1.0", "web-animations-js": "^2.3.1", - "whatwg-fetch": "^2.0.4", + "whatwg-fetch": "^3.0.0", "xhr-polyfill": "^0.1.8", "zone.js": "^0.8.26" }, diff --git a/src/constant/constant.ts b/src/constant/constant.ts index b599362..a81c490 100644 --- a/src/constant/constant.ts +++ b/src/constant/constant.ts @@ -84,6 +84,13 @@ export const constant: IConstant = { version: environment.NPM_PACKAGE_DEPENDENCIES_BLOB_POLYFILL, dependencies: ["base64", "url"] }, + requestidlecallback: { + library: "requestidlecallback", + relativePaths: ["index.js"], + features: ["requestidlecallback"], + version: environment.NPM_PACKAGE_DEPENDENCIES_REQUESTIDLECALLBACK, + dependencies: ["requestanimationframe"] + }, requestanimationframe: { library: "requestanimationframe", relativePaths: ["app/requestAnimationFrame.js"], diff --git a/src/environment/environment-defaults.ts b/src/environment/environment-defaults.ts index 9fe2673..0f623de 100644 --- a/src/environment/environment-defaults.ts +++ b/src/environment/environment-defaults.ts @@ -23,6 +23,7 @@ export const environmentDefaults = { NPM_PACKAGE_DEPENDENCIES_PERFNOW: "", NPM_PACKAGE_DEPENDENCIES_BLOB_POLYFILL: "", NPM_PACKAGE_DEPENDENCIES_REQUESTANIMATIONFRAME: "", + NPM_PACKAGE_DEPENDENCIES_REQUESTIDLECALLBACK: "", NPM_PACKAGE_DEPENDENCIES_URL_POLYFILL: "", NPM_PACKAGE_DEPENDENCIES_OBJECT_FIT_IMAGES: "", NPM_PACKAGE_DEPENDENCIES_CONSOLE_POLYFILL: "", diff --git a/src/polyfill/polyfill-name.ts b/src/polyfill/polyfill-name.ts index 94e5b3b..75aa529 100644 --- a/src/polyfill/polyfill-name.ts +++ b/src/polyfill/polyfill-name.ts @@ -289,6 +289,7 @@ export declare type PolyfillDealiasedName = |"performance.now" |"blob" |"requestanimationframe" + |"requestidlecallback" |"url" |"base64" |"xhr"