@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 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: new Sanitizer({ allowElements: ['style', 'html', 'head', 'body'] }) }
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: new Sanitizer({ allowElements: ['style', 'html', 'head', 'body'] }) }
76
+ { sanitizer: { allowElements: ['style', 'html', 'head', 'body'] }}
77
77
  ).styleSheets.item(0);
78
78
 
79
79
  clearCSSRules(this);
package/JSON.js CHANGED
@@ -1,5 +1,7 @@
1
+
2
+ /* global Record Tuple */
1
3
  if (! (JSON.parseImmutable instanceof Function)) {
2
- /* eslint-disable no-inner-declarations */
4
+
3
5
  function getImmutable(thing) {
4
6
  switch (typeof thing) {
5
7
  case 'object':
package/Record.js CHANGED
@@ -1,5 +1,5 @@
1
1
  if (! (globalThis.Record instanceof Function)) {
2
- /* eslint-disable no-inner-declarations */
2
+
3
3
  function Record(obj) {
4
4
  if (new.target === Record) {
5
5
  throw new TypeError('Record is not a constructor');
package/Tuple.js CHANGED
@@ -1,5 +1,5 @@
1
1
  if (! (globalThis.Tuple instanceof Function)) {
2
- /* eslint-disable no-inner-declarations */
2
+
3
3
 
4
4
  /**
5
5
  * Creates an unfrozen Tuple, such as for `Tuple.of()`
package/all.js CHANGED
@@ -1,42 +1,3 @@
1
- /**
2
- * @copyright 2023-2024 Chris Zuber <admin@kernvalley.us>
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'));