@shgysk8zer0/polyfills 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/CSSStyleSheet.js +2 -2
- package/JSON.js +3 -1
- package/Record.js +1 -1
- package/Tuple.js +1 -1
- package/all.js +3 -42
- package/all.min.js +11 -11
- package/all.min.js.map +1 -1
- package/array.js +19 -29
- package/assets/dedent.js +173 -159
- package/assets/url-pattern.js +34 -9
- package/browser.js +43 -0
- package/browser.min.js +56 -0
- package/browser.min.js.map +1 -0
- package/errors.js +10 -0
- package/map.js +37 -41
- package/node.js +1 -0
- package/node.min.js +2 -2
- package/node.min.js.map +1 -1
- package/package.json +17 -4
- package/regexp.js +8 -0
- package/deprecated/.gitkeep +0 -0
- package/rollup.config.js +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- markdownlint-disable -->
|
|
1
2
|
# Changelog
|
|
2
3
|
All notable changes to this project will be documented in this file.
|
|
3
4
|
|
|
@@ -6,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
7
|
|
|
7
8
|
## [Unreleased]
|
|
8
9
|
|
|
10
|
+
## [v0.4.4] - 2024-10-09
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Add `Error.isError` (imperfect, but works)
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- Fixed and simplicy `Array.prototype.uniqueBy`
|
|
17
|
+
|
|
18
|
+
## [v0.4.3] - 2024-09-17
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- Add a few tests via `*.test.js` and `node --test`
|
|
22
|
+
- Add `browser.js` (replaces `all.js`)
|
|
23
|
+
- Add `RegExp.escape`
|
|
24
|
+
- Add `exports` to `package.json`
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Update to node 20.9.0
|
|
28
|
+
|
|
29
|
+
### Deprecated
|
|
30
|
+
- Deprecated `all.js`/`all.min.js`
|
|
31
|
+
|
|
9
32
|
## [v0.4.2] - 2024-09-13
|
|
10
33
|
|
|
11
34
|
### Added
|
package/CSSStyleSheet.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function createSheet(rules = '', { disabled = false, media } = {}) {
|
|
2
2
|
const style = Document.parseHTML(
|
|
3
3
|
`<style>${rules}</style>`,
|
|
4
|
-
{ sanitizer:
|
|
4
|
+
{ sanitizer: { allowElements: ['style', 'html', 'head', 'body'] }}
|
|
5
5
|
);
|
|
6
6
|
|
|
7
7
|
const sheet = style.styleSheets.item(0);
|
|
@@ -73,7 +73,7 @@ if (! (CSSStyleSheet.prototype.replaceSync instanceof Function)) {
|
|
|
73
73
|
CSSStyleSheet.prototype.replaceSync = function replaceSync(rules) {
|
|
74
74
|
const sheet = Document.parseHTML(
|
|
75
75
|
`<style>${rules}</style>`,
|
|
76
|
-
{ sanitizer:
|
|
76
|
+
{ sanitizer: { allowElements: ['style', 'html', 'head', 'body'] }}
|
|
77
77
|
).styleSheets.item(0);
|
|
78
78
|
|
|
79
79
|
clearCSSRules(this);
|
package/JSON.js
CHANGED
package/Record.js
CHANGED
package/Tuple.js
CHANGED
package/all.js
CHANGED
|
@@ -1,42 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import './globalThis.js';
|
|
5
|
-
import './string.js';
|
|
6
|
-
import './deprefixer.js';
|
|
7
|
-
import './object.js';
|
|
8
|
-
import './map.js';
|
|
9
|
-
import './array.js';
|
|
10
|
-
import './symbols.js';
|
|
11
|
-
import './function.js';
|
|
12
|
-
import './url.js';
|
|
13
|
-
import './number.js';
|
|
14
|
-
import './iterator.js';
|
|
15
|
-
import './math.js';
|
|
16
|
-
import './secure-context.js';
|
|
17
|
-
import './navigator.js';
|
|
18
|
-
import './performance.js';
|
|
19
|
-
import './abort.js';
|
|
20
|
-
import './errors.js';
|
|
21
|
-
import './match-media.js';
|
|
22
|
-
import './promise.js';
|
|
23
|
-
import './textEncoder.js';
|
|
24
|
-
import './crypto.js';
|
|
25
|
-
import './cookieStore.js';
|
|
26
|
-
import './animation.js';
|
|
27
|
-
import './trustedTypes.js';
|
|
28
|
-
import './Document.js';
|
|
29
|
-
import './ShadowRoot.js';
|
|
30
|
-
import './CSSStyleSheet.js';
|
|
31
|
-
import './element.js';
|
|
32
|
-
import './set.js';
|
|
33
|
-
import './weakMap.js';
|
|
34
|
-
import './window.js';
|
|
35
|
-
import './scheduler.js';
|
|
36
|
-
import './elementInternals.js';
|
|
37
|
-
import './blob.js';
|
|
38
|
-
import './request.js';
|
|
39
|
-
import './response.js';
|
|
40
|
-
import './Record.js';
|
|
41
|
-
import './Tuple.js';
|
|
42
|
-
import './JSON.js';
|
|
1
|
+
import './browser.js';
|
|
2
|
+
|
|
3
|
+
console.warn(new Error('`all.js` and `all.min.js` are deprecated. Please switch to `browser.js`/`browser.min.js'));
|