@js-temporal/polyfill
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "@js-temporal/polyfill", | ||
"version": "0.2.0", | ||
"description": "Polyfill for Temporal", | ||
"type": "commonjs", | ||
"main": "dist/index.js", | ||
"browser": "dist/index.umd.js", | ||
"types": "index.d.ts", | ||
"version": "0.3.0", | ||
"description": "Polyfill for Tc39 Stage 3 proposal Temporal (https://github.com/tc39/proposal-temporal)", | ||
"type": "module", | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.esm.js", | ||
"browser": "./dist/index.umd.js", | ||
"exports": { | ||
".": [ | ||
{ | ||
"import": "./dist/index.esm.js", | ||
"default": "./dist/index.cjs" | ||
}, | ||
"./dist/index.cjs" | ||
] | ||
}, | ||
"types": "./index.d.ts", | ||
"scripts": { | ||
"test": "node --no-warnings --experimental-modules --icu-data-dir node_modules/full-icu --loader ./test/resolve.source.mjs ./test/all.mjs", | ||
"build": "rollup -c rollup.config.js", | ||
"test": "tsc && node --no-warnings --experimental-modules --experimental-specifier-resolution=node --icu-data-dir node_modules/full-icu --loader ./test/resolve.source.mjs ./test/all.mjs", | ||
"test262": "TEST262=1 npm run build && ./test/test262.sh", | ||
"build": "rm -rf dist/* tsc-out/* && tsc && rollup -c rollup.config.js", | ||
"prepare": "npm run build", | ||
"prepublishOnly": "npm run build", | ||
"playground": "node --experimental-modules --no-warnings --icu-data-dir node_modules/full-icu -r ./lib/init.js", | ||
"lint": "eslint . --ext js,mjs,.d.ts --max-warnings 0 --cache \"$@\"", | ||
"update": "npx npm-check-updates -u -x @pipobscure/demitasse && npm install", | ||
"playground": "TEMPORAL_PLAYGROUND=1 npm run build && node --experimental-modules --no-warnings --icu-data-dir node_modules/full-icu -r ./dist/playground.cjs", | ||
"lint": "eslint . --ext ts,js,mjs,.d.ts --max-warnings 0 --cache \"$@\" && npm run prettier", | ||
"postlint": "npm run tscheck", | ||
"pretty": "eslint . --ext js,mjs,.d.ts --fix", | ||
"prune": "ts-prune -e -i test/tc39 -i \"(lib/index|lib/init|index.d).ts\"", | ||
"prettier": "prettier lib/* ./test/*.mjs ./*.md ./*.json ./*.d.ts ./*.js ./.*.yml --check", | ||
"prettierfix": "prettier lib/* ./test/*.mjs ./*.md ./*.json ./*.d.ts ./*.js ./.*.yml --check --write", | ||
"eslintfix": "eslint . --ext ts,js,mjs,.d.ts --fix", | ||
"fix": "npm run eslintfix && npm run prettierfix", | ||
"tscheck": "tsc index.d.ts --noEmit --strict --lib ESNext" | ||
@@ -38,2 +55,3 @@ }, | ||
"Justin Grant", | ||
"James Wright", | ||
"Maggie Johnson-Pint", | ||
@@ -52,29 +70,34 @@ "Matt Johnson-Pint", | ||
"dist", | ||
"lib" | ||
"lib", | ||
"CHANGELOG.md" | ||
], | ||
"dependencies": { | ||
"big-integer": "^1.6.48", | ||
"es-abstract": "^1.18.3" | ||
"big-integer": "^1.6.51", | ||
"tslib": "^2.3.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.11.6", | ||
"@babel/preset-env": "^7.11.5", | ||
"@babel/core": "^7.16.0", | ||
"@babel/preset-env": "^7.16.4", | ||
"@pipobscure/demitasse": "^1.0.10", | ||
"@pipobscure/demitasse-pretty": "^1.0.10", | ||
"@pipobscure/demitasse-run": "^1.0.10", | ||
"@rollup/plugin-babel": "^5.2.1", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"@rollup/plugin-replace": "^2.3.3", | ||
"@typescript-eslint/eslint-plugin": "^4.3.0", | ||
"@typescript-eslint/parser": "^4.3.0", | ||
"eslint": "^7.10.0", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^21.0.1", | ||
"@rollup/plugin-node-resolve": "^13.0.6", | ||
"@rollup/plugin-replace": "^3.0.0", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@typescript-eslint/eslint-plugin": "^5.6.0", | ||
"@typescript-eslint/parser": "^5.6.0", | ||
"eslint": "^8.4.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"full-icu": "^1.3.0", | ||
"prettier": "^2.1.2", | ||
"rollup": "^2.28.2", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"full-icu": "^1.4.0", | ||
"prettier": "^2.5.1", | ||
"rollup": "^2.60.2", | ||
"rollup-plugin-dts": "^4.0.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"timezones.json": "^1.5.2", | ||
"typescript": "^4.0.3" | ||
"test262-harness": "^9.0.0", | ||
"timezones.json": "^1.5.3", | ||
"ts-prune": "^0.10.2", | ||
"typescript": "^4.5.2" | ||
}, | ||
@@ -81,0 +104,0 @@ "engines": { |
@@ -16,11 +16,13 @@ # Temporal Polyfill | ||
* [x] Fork non-production polyfill from [tc39/proposal-temporal repo](https://github.com/tc39/proposal-temporal/tree/main/polyfill) | ||
* [x] Release initial pre-alpha to NPM at [@js-temporal/polyfill](https://www.npmjs.com/package/@js-temporal/polyfill) | ||
* [x] Sync the code in this repo with the handful of polyfill changes that have recently been made in the [tc39/proposal-temporal](https://github.com/tc39/proposal-temporal) repo | ||
* [x] Release alpha version to NPM | ||
* [x] Deprecate all other earlier Temporal polyfills | ||
* [x] Optimize slow operations by reducing calls to Intl.DateTimeFormat constructor (see #7, #8, #10, #12) | ||
* [ ] Convert to TypeScript for better maintainability | ||
* [ ] (maybe) Optimize performance of other slow operations | ||
* [ ] Release production version to NPM | ||
- [x] Fork non-production polyfill from [tc39/proposal-temporal repo](https://github.com/tc39/proposal-temporal/tree/main/polyfill) | ||
- [x] Release initial pre-alpha to NPM at [@js-temporal/polyfill](https://www.npmjs.com/package/@js-temporal/polyfill) | ||
- [x] Sync the code in this repo with the handful of polyfill changes that have recently been made in the [tc39/proposal-temporal](https://github.com/tc39/proposal-temporal) repo | ||
- [x] Release alpha version to NPM | ||
- [x] Deprecate all other earlier Temporal polyfills | ||
- [x] Optimize slow operations by reducing calls to Intl.DateTimeFormat constructor (see #7, #8, #10, #12) | ||
- [x] Convert to TypeScript for better maintainability | ||
- [x] Improve typing of sources for better maintainability | ||
- [ ] Migrate to JSBI for improved compile-time safety around BigInt operations. | ||
- [ ] Optimize performance of other slow operations | ||
- [ ] Release production version to NPM | ||
@@ -62,3 +64,3 @@ ## Bug Reports and Feedback | ||
```javascript | ||
import { Temporal, Intl, toTemporalInstant } from '@js-temporal/polyfill/lib/index.mjs'; | ||
import { Temporal, Intl, toTemporalInstant } from '@js-temporal/polyfill'; | ||
Date.prototype.toTemporalInstant = toTemporalInstant; | ||
@@ -73,2 +75,6 @@ ``` | ||
This polyfill ships ES2020 code for both CJS and ESM bundles - if your | ||
environment does not support ES2020, then please make sure to transpile the | ||
content of this package along with the rest of your code. | ||
## Contributing / Help Wanted | ||
@@ -75,0 +81,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4728790
33
44391
81
Yes
24
2
+ Addedtslib@^2.3.1
+ Addedtslib@2.6.2(transitive)
- Removedes-abstract@^1.18.3
- Removedarray-buffer-byte-length@1.0.1(transitive)
- Removedarraybuffer.prototype.slice@1.0.3(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removeddata-view-buffer@1.0.1(transitive)
- Removeddata-view-byte-length@1.0.1(transitive)
- Removeddata-view-byte-offset@1.0.0(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removedes-abstract@1.23.3(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.0.0(transitive)
- Removedes-set-tostringtag@2.0.3(transitive)
- Removedes-to-primitive@1.2.1(transitive)
- Removedfor-each@0.3.3(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedfunction.prototype.name@1.1.6(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedget-symbol-description@1.0.2(transitive)
- Removedglobalthis@1.0.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-bigints@1.0.2(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinternal-slot@1.0.7(transitive)
- Removedis-array-buffer@3.0.4(transitive)
- Removedis-bigint@1.0.4(transitive)
- Removedis-boolean-object@1.1.2(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-data-view@1.0.1(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-negative-zero@2.0.3(transitive)
- Removedis-number-object@1.0.7(transitive)
- Removedis-regex@1.1.4(transitive)
- Removedis-shared-array-buffer@1.0.3(transitive)
- Removedis-string@1.0.7(transitive)
- Removedis-symbol@1.0.4(transitive)
- Removedis-typed-array@1.1.13(transitive)
- Removedis-weakref@1.0.2(transitive)
- Removedisarray@2.0.5(transitive)
- Removedobject-inspect@1.13.1(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedobject.assign@4.1.5(transitive)
- Removedpossible-typed-array-names@1.0.0(transitive)
- Removedregexp.prototype.flags@1.5.2(transitive)
- Removedsafe-array-concat@1.1.2(transitive)
- Removedsafe-regex-test@1.0.3(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
- Removedside-channel@1.0.6(transitive)
- Removedstring.prototype.trim@1.2.9(transitive)
- Removedstring.prototype.trimend@1.0.8(transitive)
- Removedstring.prototype.trimstart@1.0.8(transitive)
- Removedtyped-array-buffer@1.0.2(transitive)
- Removedtyped-array-byte-length@1.0.1(transitive)
- Removedtyped-array-byte-offset@1.0.2(transitive)
- Removedtyped-array-length@1.0.6(transitive)
- Removedunbox-primitive@1.0.2(transitive)
- Removedwhich-boxed-primitive@1.0.2(transitive)
- Removedwhich-typed-array@1.1.15(transitive)
Updatedbig-integer@^1.6.51