styled-map-package 4.0.1 → 4.1.0

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.
Files changed (189) hide show
  1. package/bin/smp-download.js +1 -1
  2. package/bin/smp-view.js +32 -23
  3. package/dist/download.d.cts +1 -1
  4. package/dist/download.d.ts +1 -1
  5. package/dist/index.d.cts +2 -2
  6. package/dist/index.d.ts +2 -2
  7. package/dist/reader-watch.d.cts +1 -1
  8. package/dist/reader-watch.d.ts +1 -1
  9. package/dist/reader.cjs +2 -1
  10. package/dist/reader.d.cts +1 -1
  11. package/dist/reader.d.ts +1 -1
  12. package/dist/reader.js +2 -1
  13. package/dist/server.d.cts +1 -1
  14. package/dist/server.d.ts +1 -1
  15. package/dist/style-downloader.cjs +2 -2
  16. package/dist/style-downloader.d.cts +1 -1
  17. package/dist/style-downloader.d.ts +1 -1
  18. package/dist/style-downloader.js +2 -2
  19. package/dist/tile-downloader.cjs +2 -2
  20. package/dist/tile-downloader.d.cts +1 -1
  21. package/dist/tile-downloader.d.ts +1 -1
  22. package/dist/tile-downloader.js +2 -2
  23. package/dist/{types-B4Xn1F9K.d.cts → types-yLQy3AKR.d.cts} +6 -3
  24. package/dist/{types-B4Xn1F9K.d.ts → types-yLQy3AKR.d.ts} +6 -3
  25. package/dist/utils/file-formats.d.cts +1 -1
  26. package/dist/utils/file-formats.d.ts +1 -1
  27. package/dist/utils/style.cjs +2 -2
  28. package/dist/utils/style.d.cts +1 -1
  29. package/dist/utils/style.d.ts +1 -1
  30. package/dist/utils/style.js +2 -2
  31. package/dist/utils/templates.cjs +4 -0
  32. package/dist/utils/templates.d.cts +4 -2
  33. package/dist/utils/templates.d.ts +4 -2
  34. package/dist/utils/templates.js +2 -0
  35. package/dist/writer.cjs +51 -3
  36. package/dist/writer.d.cts +1 -1
  37. package/dist/writer.d.ts +1 -1
  38. package/dist/writer.js +53 -3
  39. package/node_modules/@node-rs/crc32/LICENSE +21 -0
  40. package/node_modules/@node-rs/crc32/README.md +61 -0
  41. package/node_modules/@node-rs/crc32/browser.js +1 -0
  42. package/node_modules/@node-rs/crc32/index.d.ts +5 -0
  43. package/node_modules/@node-rs/crc32/index.js +368 -0
  44. package/node_modules/@node-rs/crc32/package.json +97 -0
  45. package/node_modules/@node-rs/crc32-linux-x64-gnu/README.md +3 -0
  46. package/node_modules/@node-rs/crc32-linux-x64-gnu/crc32.linux-x64-gnu.node +0 -0
  47. package/node_modules/@node-rs/crc32-linux-x64-gnu/package.json +43 -0
  48. package/node_modules/@node-rs/crc32-linux-x64-musl/README.md +3 -0
  49. package/node_modules/@node-rs/crc32-linux-x64-musl/crc32.linux-x64-musl.node +0 -0
  50. package/node_modules/@node-rs/crc32-linux-x64-musl/package.json +43 -0
  51. package/node_modules/define-data-property/.eslintrc +24 -0
  52. package/node_modules/define-data-property/.github/FUNDING.yml +12 -0
  53. package/node_modules/define-data-property/.nycrc +13 -0
  54. package/node_modules/define-data-property/CHANGELOG.md +70 -0
  55. package/node_modules/define-data-property/LICENSE +21 -0
  56. package/node_modules/define-data-property/README.md +67 -0
  57. package/node_modules/define-data-property/index.d.ts +12 -0
  58. package/node_modules/define-data-property/index.js +56 -0
  59. package/node_modules/define-data-property/package.json +106 -0
  60. package/node_modules/define-data-property/test/index.js +392 -0
  61. package/node_modules/define-data-property/tsconfig.json +59 -0
  62. package/node_modules/define-properties/.editorconfig +13 -0
  63. package/node_modules/define-properties/.eslintrc +19 -0
  64. package/node_modules/define-properties/.github/FUNDING.yml +12 -0
  65. package/node_modules/define-properties/.nycrc +9 -0
  66. package/node_modules/define-properties/CHANGELOG.md +91 -0
  67. package/node_modules/define-properties/LICENSE +21 -0
  68. package/node_modules/define-properties/README.md +84 -0
  69. package/node_modules/define-properties/index.js +47 -0
  70. package/node_modules/define-properties/package.json +88 -0
  71. package/node_modules/es-define-property/.eslintrc +13 -0
  72. package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  73. package/node_modules/es-define-property/.nycrc +9 -0
  74. package/node_modules/es-define-property/CHANGELOG.md +29 -0
  75. package/node_modules/es-define-property/LICENSE +21 -0
  76. package/node_modules/es-define-property/README.md +49 -0
  77. package/node_modules/es-define-property/index.d.ts +3 -0
  78. package/node_modules/es-define-property/index.js +14 -0
  79. package/node_modules/es-define-property/package.json +81 -0
  80. package/node_modules/es-define-property/test/index.js +56 -0
  81. package/node_modules/es-define-property/tsconfig.json +10 -0
  82. package/node_modules/es-errors/.eslintrc +5 -0
  83. package/node_modules/es-errors/.github/FUNDING.yml +12 -0
  84. package/node_modules/es-errors/CHANGELOG.md +40 -0
  85. package/node_modules/es-errors/LICENSE +21 -0
  86. package/node_modules/es-errors/README.md +55 -0
  87. package/node_modules/es-errors/eval.d.ts +3 -0
  88. package/node_modules/es-errors/eval.js +4 -0
  89. package/node_modules/es-errors/index.d.ts +3 -0
  90. package/node_modules/es-errors/index.js +4 -0
  91. package/node_modules/es-errors/package.json +80 -0
  92. package/node_modules/es-errors/range.d.ts +3 -0
  93. package/node_modules/es-errors/range.js +4 -0
  94. package/node_modules/es-errors/ref.d.ts +3 -0
  95. package/node_modules/es-errors/ref.js +4 -0
  96. package/node_modules/es-errors/syntax.d.ts +3 -0
  97. package/node_modules/es-errors/syntax.js +4 -0
  98. package/node_modules/es-errors/test/index.js +19 -0
  99. package/node_modules/es-errors/tsconfig.json +49 -0
  100. package/node_modules/es-errors/type.d.ts +3 -0
  101. package/node_modules/es-errors/type.js +4 -0
  102. package/node_modules/es-errors/uri.d.ts +3 -0
  103. package/node_modules/es-errors/uri.js +4 -0
  104. package/node_modules/globalthis/.eslintrc +18 -0
  105. package/node_modules/globalthis/.nycrc +10 -0
  106. package/node_modules/globalthis/CHANGELOG.md +109 -0
  107. package/node_modules/globalthis/LICENSE +21 -0
  108. package/node_modules/globalthis/README.md +70 -0
  109. package/node_modules/globalthis/auto.js +3 -0
  110. package/node_modules/globalthis/implementation.browser.js +11 -0
  111. package/node_modules/globalthis/implementation.js +3 -0
  112. package/node_modules/globalthis/index.js +19 -0
  113. package/node_modules/globalthis/package.json +99 -0
  114. package/node_modules/globalthis/polyfill.js +10 -0
  115. package/node_modules/globalthis/shim.js +29 -0
  116. package/node_modules/globalthis/test/implementation.js +11 -0
  117. package/node_modules/globalthis/test/index.js +11 -0
  118. package/node_modules/globalthis/test/native.js +26 -0
  119. package/node_modules/globalthis/test/shimmed.js +29 -0
  120. package/node_modules/globalthis/test/tests.js +36 -0
  121. package/node_modules/gopd/.eslintrc +16 -0
  122. package/node_modules/gopd/.github/FUNDING.yml +12 -0
  123. package/node_modules/gopd/CHANGELOG.md +45 -0
  124. package/node_modules/gopd/LICENSE +21 -0
  125. package/node_modules/gopd/README.md +40 -0
  126. package/node_modules/gopd/gOPD.d.ts +1 -0
  127. package/node_modules/gopd/gOPD.js +4 -0
  128. package/node_modules/gopd/index.d.ts +5 -0
  129. package/node_modules/gopd/index.js +15 -0
  130. package/node_modules/gopd/package.json +77 -0
  131. package/node_modules/gopd/test/index.js +36 -0
  132. package/node_modules/gopd/tsconfig.json +9 -0
  133. package/node_modules/has-property-descriptors/.eslintrc +13 -0
  134. package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
  135. package/node_modules/has-property-descriptors/.nycrc +9 -0
  136. package/node_modules/has-property-descriptors/CHANGELOG.md +35 -0
  137. package/node_modules/has-property-descriptors/LICENSE +21 -0
  138. package/node_modules/has-property-descriptors/README.md +43 -0
  139. package/node_modules/has-property-descriptors/index.js +22 -0
  140. package/node_modules/has-property-descriptors/package.json +77 -0
  141. package/node_modules/has-property-descriptors/test/index.js +57 -0
  142. package/node_modules/is-it-type/License +19 -0
  143. package/node_modules/is-it-type/README.md +102 -0
  144. package/node_modules/is-it-type/changelog.md +239 -0
  145. package/node_modules/is-it-type/dist/cjs/is-it-type.js +173 -0
  146. package/node_modules/is-it-type/dist/cjs/is-it-type.js.map +1 -0
  147. package/node_modules/is-it-type/dist/cjs/is-it-type.min.js +2 -0
  148. package/node_modules/is-it-type/dist/cjs/is-it-type.min.js.map +1 -0
  149. package/node_modules/is-it-type/dist/esm/is-it-type.js +143 -0
  150. package/node_modules/is-it-type/dist/esm/is-it-type.js.map +1 -0
  151. package/node_modules/is-it-type/dist/esm/is-it-type.min.js +2 -0
  152. package/node_modules/is-it-type/dist/esm/is-it-type.min.js.map +1 -0
  153. package/node_modules/is-it-type/dist/esm/package.json +3 -0
  154. package/node_modules/is-it-type/dist/umd/is-it-type.js +450 -0
  155. package/node_modules/is-it-type/dist/umd/is-it-type.js.map +1 -0
  156. package/node_modules/is-it-type/dist/umd/is-it-type.min.js +2 -0
  157. package/node_modules/is-it-type/dist/umd/is-it-type.min.js.map +1 -0
  158. package/node_modules/is-it-type/es/index.js +8 -0
  159. package/node_modules/is-it-type/es/package.json +3 -0
  160. package/node_modules/is-it-type/index.js +10 -0
  161. package/node_modules/is-it-type/package.json +87 -0
  162. package/node_modules/is-it-type/src/index.js +169 -0
  163. package/node_modules/object-keys/.editorconfig +13 -0
  164. package/node_modules/object-keys/.eslintrc +17 -0
  165. package/node_modules/object-keys/.travis.yml +277 -0
  166. package/node_modules/object-keys/CHANGELOG.md +232 -0
  167. package/node_modules/object-keys/LICENSE +21 -0
  168. package/node_modules/object-keys/README.md +76 -0
  169. package/node_modules/object-keys/implementation.js +122 -0
  170. package/node_modules/object-keys/index.js +32 -0
  171. package/node_modules/object-keys/isArguments.js +17 -0
  172. package/node_modules/object-keys/package.json +88 -0
  173. package/node_modules/object-keys/test/index.js +5 -0
  174. package/node_modules/simple-invariant/License +19 -0
  175. package/node_modules/simple-invariant/README.md +64 -0
  176. package/node_modules/simple-invariant/changelog.md +31 -0
  177. package/node_modules/simple-invariant/index.js +19 -0
  178. package/node_modules/simple-invariant/package.json +50 -0
  179. package/node_modules/yauzl-promise/License +19 -0
  180. package/node_modules/yauzl-promise/README.md +440 -0
  181. package/node_modules/yauzl-promise/index.js +10 -0
  182. package/node_modules/yauzl-promise/lib/entry.js +312 -0
  183. package/node_modules/yauzl-promise/lib/index.js +160 -0
  184. package/node_modules/yauzl-promise/lib/reader.js +289 -0
  185. package/node_modules/yauzl-promise/lib/shared.js +20 -0
  186. package/node_modules/yauzl-promise/lib/utils.js +105 -0
  187. package/node_modules/yauzl-promise/lib/zip.js +1224 -0
  188. package/node_modules/yauzl-promise/package.json +56 -0
  189. package/package.json +9 -11
@@ -0,0 +1,3 @@
1
+ declare const EvalError: EvalErrorConstructor;
2
+
3
+ export = EvalError;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./eval')} */
4
+ module.exports = EvalError;
@@ -0,0 +1,3 @@
1
+ declare const Error: ErrorConstructor;
2
+
3
+ export = Error;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('.')} */
4
+ module.exports = Error;
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "es-errors",
3
+ "version": "1.3.0",
4
+ "description": "A simple cache for a few of the JS Error constructors.",
5
+ "main": "index.js",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./eval": "./eval.js",
9
+ "./range": "./range.js",
10
+ "./ref": "./ref.js",
11
+ "./syntax": "./syntax.js",
12
+ "./type": "./type.js",
13
+ "./uri": "./uri.js",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "sideEffects": false,
17
+ "scripts": {
18
+ "prepack": "npmignore --auto --commentLines=autogenerated",
19
+ "prepublishOnly": "safe-publish-latest",
20
+ "prepublish": "not-in-publish || npm run prepublishOnly",
21
+ "pretest": "npm run lint",
22
+ "test": "npm run tests-only",
23
+ "tests-only": "nyc tape 'test/**/*.js'",
24
+ "posttest": "aud --production",
25
+ "prelint": "evalmd README.md",
26
+ "lint": "eslint --ext=js,mjs .",
27
+ "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
28
+ "version": "auto-changelog && git add CHANGELOG.md",
29
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/ljharb/es-errors.git"
34
+ },
35
+ "keywords": [
36
+ "javascript",
37
+ "ecmascript",
38
+ "error",
39
+ "typeerror",
40
+ "syntaxerror",
41
+ "rangeerror"
42
+ ],
43
+ "author": "Jordan Harband <ljharb@gmail.com>",
44
+ "license": "MIT",
45
+ "bugs": {
46
+ "url": "https://github.com/ljharb/es-errors/issues"
47
+ },
48
+ "homepage": "https://github.com/ljharb/es-errors#readme",
49
+ "devDependencies": {
50
+ "@ljharb/eslint-config": "^21.1.0",
51
+ "@types/tape": "^5.6.4",
52
+ "aud": "^2.0.4",
53
+ "auto-changelog": "^2.4.0",
54
+ "eclint": "^2.8.1",
55
+ "eslint": "^8.8.0",
56
+ "evalmd": "^0.0.19",
57
+ "in-publish": "^2.0.1",
58
+ "npmignore": "^0.3.1",
59
+ "nyc": "^10.3.2",
60
+ "safe-publish-latest": "^2.0.0",
61
+ "tape": "^5.7.4",
62
+ "typescript": "next"
63
+ },
64
+ "auto-changelog": {
65
+ "output": "CHANGELOG.md",
66
+ "template": "keepachangelog",
67
+ "unreleased": false,
68
+ "commitLimit": false,
69
+ "backfillLimit": false,
70
+ "hideCredit": true
71
+ },
72
+ "publishConfig": {
73
+ "ignore": [
74
+ ".github/workflows"
75
+ ]
76
+ },
77
+ "engines": {
78
+ "node": ">= 0.4"
79
+ }
80
+ }
@@ -0,0 +1,3 @@
1
+ declare const RangeError: RangeErrorConstructor;
2
+
3
+ export = RangeError;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./range')} */
4
+ module.exports = RangeError;
@@ -0,0 +1,3 @@
1
+ declare const ReferenceError: ReferenceErrorConstructor;
2
+
3
+ export = ReferenceError;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./ref')} */
4
+ module.exports = ReferenceError;
@@ -0,0 +1,3 @@
1
+ declare const SyntaxError: SyntaxErrorConstructor;
2
+
3
+ export = SyntaxError;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./syntax')} */
4
+ module.exports = SyntaxError;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+
5
+ var E = require('../');
6
+ var R = require('../range');
7
+ var Ref = require('../ref');
8
+ var S = require('../syntax');
9
+ var T = require('../type');
10
+
11
+ test('errors', function (t) {
12
+ t.equal(E, Error);
13
+ t.equal(R, RangeError);
14
+ t.equal(Ref, ReferenceError);
15
+ t.equal(S, SyntaxError);
16
+ t.equal(T, TypeError);
17
+
18
+ t.end();
19
+ });
@@ -0,0 +1,49 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
+
5
+ /* Projects */
6
+
7
+ /* Language and Environment */
8
+ "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
9
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
10
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
11
+ "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
12
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
13
+
14
+ /* Modules */
15
+ "module": "commonjs", /* Specify what module code is generated. */
16
+ // "rootDir": "./", /* Specify the root folder within your source files. */
17
+ // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
18
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
19
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
20
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
21
+ // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */
22
+ "resolveJsonModule": true, /* Enable importing .json files. */
23
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
24
+
25
+ /* JavaScript Support */
26
+ "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
27
+ "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
28
+ "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
29
+
30
+ /* Emit */
31
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
32
+ "declarationMap": true, /* Create sourcemaps for d.ts files. */
33
+ "noEmit": true, /* Disable emitting files from a compilation. */
34
+
35
+ /* Interop Constraints */
36
+ "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */
37
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
38
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
39
+
40
+ /* Type Checking */
41
+ "strict": true, /* Enable all strict type-checking options. */
42
+
43
+ /* Completeness */
44
+ // "skipLibCheck": true /* Skip type checking all .d.ts files. */
45
+ },
46
+ "exclude": [
47
+ "coverage",
48
+ ],
49
+ }
@@ -0,0 +1,3 @@
1
+ declare const TypeError: TypeErrorConstructor
2
+
3
+ export = TypeError;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./type')} */
4
+ module.exports = TypeError;
@@ -0,0 +1,3 @@
1
+ declare const URIError: URIErrorConstructor;
2
+
3
+ export = URIError;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./uri')} */
4
+ module.exports = URIError;
@@ -0,0 +1,18 @@
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
6
+ "env": {
7
+ "browser": true,
8
+ "node": true,
9
+ },
10
+
11
+ "ignorePatterns": [
12
+ "dist",
13
+ ],
14
+
15
+ "rules": {
16
+ "max-statements-per-line": [2, { "max": 2 }]
17
+ }
18
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "all": true,
3
+ "check-coverage": false,
4
+ "reporter": ["text-summary", "text", "html", "json"],
5
+ "exclude": [
6
+ "coverage",
7
+ "dist",
8
+ "test"
9
+ ]
10
+ }
@@ -0,0 +1,109 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [v1.0.4](https://github.com/es-shims/globalThis/compare/v1.0.3...v1.0.4) - 2024-04-29
9
+
10
+ ### Commits
11
+
12
+ - [actions] remove redundant finisher [`280d796`](https://github.com/es-shims/globalThis/commit/280d796f7cd61da47c026d8ec8dd88015d4ed95f)
13
+ - [Refactor] use `gopd` [`0209ccb`](https://github.com/es-shims/globalThis/commit/0209ccb2cd95b785e7e8868fab035cdc87216b58)
14
+ - [actions] update rebase action to use reusable workflow [`c08aea6`](https://github.com/es-shims/globalThis/commit/c08aea6240c3747cbc3e5f4d7c3eb740ec4f0627)
15
+ - [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`f38f2af`](https://github.com/es-shims/globalThis/commit/f38f2af14797abbe466b428f0ce74843c43746d7)
16
+ - [Dev Deps] update `aud`, `tape` [`a1be102`](https://github.com/es-shims/globalThis/commit/a1be102c91da38830a45804de6a0582f752fe53f)
17
+ - [Deps] update `define-properties` [`3e41644`](https://github.com/es-shims/globalThis/commit/3e416444f87350a6df70bf778e95eb713c3011e6)
18
+ - [Deps] update `define-properties` [`3d81f70`](https://github.com/es-shims/globalThis/commit/3d81f7048ce35285e3e719b1f53fba02516e9811)
19
+ - [Dev Deps] add missing `npmignore` dep [`c2d00f7`](https://github.com/es-shims/globalThis/commit/c2d00f70d4c11cb2f035c398cb560db9677b6dc6)
20
+
21
+ ## [v1.0.3](https://github.com/es-shims/globalThis/compare/v1.0.2...v1.0.3) - 2022-05-07
22
+
23
+ ### Commits
24
+
25
+ - [actions] reuse common workflows [`65891e4`](https://github.com/es-shims/globalThis/commit/65891e4d285ae04e216ff01160cff861e0e41a4f)
26
+ - [actions] use `node/install` instead of `node/run`; use `codecov` action [`82f8481`](https://github.com/es-shims/globalThis/commit/82f84815027f666f625e1ccb41f723800a05d016)
27
+ - [meta] use `npmignore` to autogenerate an npmignore file [`53afc39`](https://github.com/es-shims/globalThis/commit/53afc39bfd3eb262c5e6e9dfd25e4f81f3578c1c)
28
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`03169d4`](https://github.com/es-shims/globalThis/commit/03169d4254c9ef177d6537becca5b0b56df50d91)
29
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`4986e3e`](https://github.com/es-shims/globalThis/commit/4986e3e20c5f664601871a0fac68c1efd0a68472)
30
+ - [actions] update codecov uploader [`15c4b06`](https://github.com/es-shims/globalThis/commit/15c4b062b1a9434dbec93604ed31b6893d11d458)
31
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`8b04a74`](https://github.com/es-shims/globalThis/commit/8b04a749d3cb2f825920beb700899f0c13ad2fb8)
32
+ - [Fix] `globalThis` should be writable [`8759985`](https://github.com/es-shims/globalThis/commit/87599852d5f91e2e1f06e424cdefcd443ec98476)
33
+ - [readme] add github actions/codecov badges [`0263f0d`](https://github.com/es-shims/globalThis/commit/0263f0debfa982b928fcd301b11fe3e3193bf33d)
34
+ - [Dev Deps] update `aud`, `eslint`, `tape` [`e88d296`](https://github.com/es-shims/globalThis/commit/e88d296bb026633bdd1be2e1542903a5d0107cd8)
35
+ - [meta] use `prepublishOnly` script for npm 7+ [`c81fde6`](https://github.com/es-shims/globalThis/commit/c81fde6a9e44345e56dada588e16db736809ddd9)
36
+ - [Tests] nycignore `dist` [`bde0c0d`](https://github.com/es-shims/globalThis/commit/bde0c0df46f684316ab414da1487a0cd2efe3eeb)
37
+ - [meta] gitignore coverage output [`79f73f8`](https://github.com/es-shims/globalThis/commit/79f73f8b0c1180567fba473f92c07d71efd4dd0b)
38
+
39
+ ## [v1.0.2](https://github.com/es-shims/globalThis/compare/v1.0.1...v1.0.2) - 2021-02-22
40
+
41
+ ### Commits
42
+
43
+ - [Tests] migrate tests to Github Actions [`a3f50f7`](https://github.com/es-shims/globalThis/commit/a3f50f77a392c0ffdaca18fb5881743b874d0a6f)
44
+ - [meta] do not publish github action workflow files [`eb5c787`](https://github.com/es-shims/globalThis/commit/eb5c7879317cd7f1fde52228660be8e779c9d4e3)
45
+ - [Tests] add `implementation` est; run `es-shim-api` in postlint; use `tape` runner [`c9dd792`](https://github.com/es-shims/globalThis/commit/c9dd792d492ec9744a5e5d5033e919b94d441bac)
46
+ - [Tests] fix native tests [`6b76dff`](https://github.com/es-shims/globalThis/commit/6b76dff3af3fe9bcd7b24d48c6ba55116169e840)
47
+ - [Tests] run `nyc` on all tests [`0407f79`](https://github.com/es-shims/globalThis/commit/0407f79f64bf9fc30111f3bf4dff7e4205331fb6)
48
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape`, `browserify` [`b8cc020`](https://github.com/es-shims/globalThis/commit/b8cc020e5ecc2d5a5a5b4160aabc60cc42d50c03)
49
+ - [actions] add "Allow Edits" workflow [`e2854df`](https://github.com/es-shims/globalThis/commit/e2854df653667b16ff34a7a0a7b677231dfe2b02)
50
+ - [readme] remove travis badge [`262eb76`](https://github.com/es-shims/globalThis/commit/262eb76e4e0d3f2df354cc6aff1b18f50c7b147f)
51
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`; add `safe-publish-latest` [`3c76883`](https://github.com/es-shims/globalThis/commit/3c7688325f6aa050afe3ed978e423e70974e4d3b)
52
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`7276123`](https://github.com/es-shims/globalThis/commit/727612396262fc22275f44159ec5b39115dc359f)
53
+ - [actions] update workflows [`bcb0f42`](https://github.com/es-shims/globalThis/commit/bcb0f42c319cf19746e03a6667cf25d3e835f46e)
54
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5485851`](https://github.com/es-shims/globalThis/commit/548585148e874d6eb0b0463526a88e8b64e7c5eb)
55
+ - [Dev Deps] update `auto-changelog`, `tape` [`6a01da3`](https://github.com/es-shims/globalThis/commit/6a01da3f321983d1970d793711d31cf8508ef94d)
56
+ - [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7a07f4e`](https://github.com/es-shims/globalThis/commit/7a07f4ebc5580933b40bbe67f357632e0f7d5586)
57
+ - [meta] only run the build script in publish [`797e492`](https://github.com/es-shims/globalThis/commit/797e492519ed0bf6270537290e69ca0456790575)
58
+ - [meta] combine duplicate `prepublish` scripts [`92bbef0`](https://github.com/es-shims/globalThis/commit/92bbef0f91f6e91163186f68b5f5f1ffd26c479d)
59
+ - [Dev Deps] update `auto-changelog`; add `aud` [`be6dbec`](https://github.com/es-shims/globalThis/commit/be6dbecefddb40493c5568a2cbe83f74e2e0385f)
60
+ - [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bfd54f8`](https://github.com/es-shims/globalThis/commit/bfd54f8388758e7dec618dc34956e7075a7c15f0)
61
+ - [Tests] only audit prod deps [`0f64b47`](https://github.com/es-shims/globalThis/commit/0f64b47acfa812affbacbe487fcb0f6c02eccc25)
62
+
63
+ ## [v1.0.1](https://github.com/es-shims/globalThis/compare/v1.0.0...v1.0.1) - 2019-12-15
64
+
65
+ ### Fixed
66
+
67
+ - [Refactor] only use `global` in node; only check browser globals in browsers [`#2`](https://github.com/es-shims/globalThis/issues/2)
68
+
69
+ ### Commits
70
+
71
+ - [Tests] use shared travis-ci configs [`edb1cc9`](https://github.com/es-shims/globalThis/commit/edb1cc9d900a40e8c1732264b6e85d4f9760920c)
72
+ - [Tests] remove `jscs` [`1847ac2`](https://github.com/es-shims/globalThis/commit/1847ac2487e2c13cf8bf717211c6a93fe60831f9)
73
+ - [meta] add `auto-changelog` [`933c381`](https://github.com/es-shims/globalThis/commit/933c381083890965ac848d3da21ed9e910cc09cf)
74
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `tape` [`93310bc`](https://github.com/es-shims/globalThis/commit/93310bc01ddacbe23a93b3022daebc9b6f6ae8c3)
75
+ - [actions] add automatic rebasing / merge commit blocking [`231dec5`](https://github.com/es-shims/globalThis/commit/231dec511c42e1509035d176e2451c55de20bfe7)
76
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `covert`, `is`, `tape` [`e50c1f6`](https://github.com/es-shims/globalThis/commit/e50c1f6d2d45c66f53ffda471bbf62c08ed15c9b)
77
+ - [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`4abd340`](https://github.com/es-shims/globalThis/commit/4abd3400fc8942963e77515d0cf2fbcac3cb7bc8)
78
+ - [meta] add `funding` field [`2d1f9eb`](https://github.com/es-shims/globalThis/commit/2d1f9eb00b2dea46f6de7d563b31db17f44f1899)
79
+ - [meta] remove unused deps [`5bd6bef`](https://github.com/es-shims/globalThis/commit/5bd6befefbaf0c7e6f70eb3c1919b5c5a271d29d)
80
+ - readme: Fix casing + phrasing [`66379cc`](https://github.com/es-shims/globalThis/commit/66379ccf5008f7676aac5f3dec1ea2fe55e3516c)
81
+ - [Deps] update `define-properties`, `object-keys` [`4585e5a`](https://github.com/es-shims/globalThis/commit/4585e5ab461093ab6c62ce0b22b959925e8f818c)
82
+ - fix issue with Webpack's CaseSensitivePathsPlugin [`842e84e`](https://github.com/es-shims/globalThis/commit/842e84e0096c9eea660c78fd19c9c07799b81537)
83
+
84
+ ## v1.0.0 - 2018-08-10
85
+
86
+ ### Commits
87
+
88
+ - Dotfiles. [`f01b02d`](https://github.com/es-shims/globalThis/commit/f01b02d315865c812e5b9158f71bb18f3b153def)
89
+ - [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm`; improve matrix [`ed1fa5d`](https://github.com/es-shims/globalThis/commit/ed1fa5d473d933b3270410b658183dc1c556a663)
90
+ - Tests [`ab99527`](https://github.com/es-shims/globalThis/commit/ab99527e3c434e89dd40f8cba3b0e2e976156611)
91
+ - [breaking] update property name, rename repo [`be42e3d`](https://github.com/es-shims/globalThis/commit/be42e3dce08b62a78260d487f62fa69b410d7918)
92
+ - package.json [`ca43a36`](https://github.com/es-shims/globalThis/commit/ca43a363e3ce0dbc2d4623169f8cb3d792f8bc84)
93
+ - implementation [`80b5a40`](https://github.com/es-shims/globalThis/commit/80b5a403ef532254b2af46ec3ba5f442a308a57d)
94
+ - read me [`f6df9b3`](https://github.com/es-shims/globalThis/commit/f6df9b3b69977f04e080d1720ba1203c13447884)
95
+ - Rename `System.global` to `global` [`fa8503c`](https://github.com/es-shims/globalThis/commit/fa8503cf94afe84b3729dd5b0e9f73f481fb1fee)
96
+ - Initial commit [`99f1dc3`](https://github.com/es-shims/globalThis/commit/99f1dc328d0b4c52a550037de0139d5452ac01de)
97
+ - [Tests] up to `node` `v6.7`, `v5.12`, `v4.6`; improve test matrix [`712ec0e`](https://github.com/es-shims/globalThis/commit/712ec0e545d1603c4e23f4ff1acb066cc4a3c9ee)
98
+ - [Dev Deps] update `browserify`, `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`73278bd`](https://github.com/es-shims/globalThis/commit/73278bd638d1e762eb7415350a738f5d345896f5)
99
+ - [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `browserify`, `eslint`, `for-each`, `is`, `nsp`, `tape` [`75fa992`](https://github.com/es-shims/globalThis/commit/75fa9929be81afec43895c02e33d0b8a78f11d1f)
100
+ - [Dev Deps] update `browserify`, `is`, `tape`, `nsp`, `eslint` [`b223e86`](https://github.com/es-shims/globalThis/commit/b223e86d0868efb1f0c966370ff2f822516d6956)
101
+ - [Tests] fix linting; remove parallelshell [`271b329`](https://github.com/es-shims/globalThis/commit/271b329d174b94c08913060752a2e9f9116fe5b8)
102
+ - [Deps] update `function-bind`, `object-keys` [`002d0c5`](https://github.com/es-shims/globalThis/commit/002d0c5685a83f97e014a8a07134eb621794c649)
103
+ - Only apps should have lockfiles [`960f1d0`](https://github.com/es-shims/globalThis/commit/960f1d00598cbba5427849c863eb10b8de82fb1b)
104
+ - [Tests] on `node` `v10.8` [`37fad9d`](https://github.com/es-shims/globalThis/commit/37fad9db9860c654efe0a32ec187f21730d5fed8)
105
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`df28dfe`](https://github.com/es-shims/globalThis/commit/df28dfe7f0daf3db95a536a6ce64062bd706185d)
106
+ - [New] add `auto` entry point [`86eb2ab`](https://github.com/es-shims/globalThis/commit/86eb2ab4c4dc2babff20ac436cf7fb7f8da7d2f2)
107
+ - [Dev Deps] update `eslint` [`1bdc1aa`](https://github.com/es-shims/globalThis/commit/1bdc1aacfb94dcdc7bb61688c7634c435012e35d)
108
+ - [Deps] update `object-keys` [`72cdbf5`](https://github.com/es-shims/globalThis/commit/72cdbf596b16103ee711d52b2b645b42efc08c51)
109
+ - Update most common usage to invoke the function upon being required [`5026296`](https://github.com/es-shims/globalThis/commit/502629660da2c21cfb0f8ca233e2b9d427c052fe)
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Jordan Harband
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,70 @@
1
+ # globalThis <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>
2
+
3
+ [![github actions][actions-image]][actions-url]
4
+ [![coverage][codecov-image]][codecov-url]
5
+ [![dependency status][deps-svg]][deps-url]
6
+ [![dev dependency status][dev-deps-svg]][dev-deps-url]
7
+ [![License][license-image]][license-url]
8
+ [![Downloads][downloads-image]][downloads-url]
9
+
10
+ [![npm badge][npm-badge-png]][npm-url]
11
+
12
+ An ECMAScript spec-compliant polyfill/shim for `globalThis`. Invoke its "shim" method to shim `globalThis` if it is unavailable.
13
+
14
+ This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec proposal](https://github.com/tc39/proposal-global).
15
+
16
+ Most common usage:
17
+ ```js
18
+ var globalThis = require('globalthis')(); // returns native globalThis if compliant
19
+ /* or */
20
+ var globalThis = require('globalthis/polyfill')(); // returns native globalThis if compliant
21
+ ```
22
+
23
+ ## Example
24
+
25
+ ```js
26
+ var assert = require('assert');
27
+
28
+ // the below function is not CSP-compliant, but reliably gets the
29
+ // global object in sloppy mode in every engine.
30
+ var getGlobal = Function('return this');
31
+
32
+ assert.equal(globalThis, getGlobal());
33
+ ```
34
+
35
+ ```js
36
+ /* when `globalThis` is not present */
37
+ var shimmedGlobal = require('globalthis').shim();
38
+ /* or */
39
+ var shimmedGlobal = require('globalthis/shim')();
40
+
41
+ assert.equal(shimmedGlobal, globalThis);
42
+ assert.equal(shimmedGlobal, getGlobal());
43
+ ```
44
+
45
+ ```js
46
+ /* when `globalThis` is present */
47
+ var shimmedGlobal = require('globalthis').shim();
48
+
49
+ assert.equal(shimmedGlobal, globalThis);
50
+ assert.equal(shimmedGlobal, getGlobal());
51
+ ```
52
+
53
+ ## Tests
54
+ Simply clone the repo, `npm install`, and run `npm test`
55
+
56
+ [npm-url]: https://npmjs.org/package/globalthis
57
+ [npm-version-svg]: https://versionbadg.es/ljharb/globalThis.svg
58
+ [deps-svg]: https://david-dm.org/ljharb/globalThis.svg?theme=shields.io
59
+ [deps-url]: https://david-dm.org/ljharb/globalThis
60
+ [dev-deps-svg]: https://david-dm.org/ljharb/globalThis/dev-status.svg?theme=shields.io
61
+ [dev-deps-url]: https://david-dm.org/ljharb/globalThis#info=devDependencies
62
+ [npm-badge-png]: https://nodei.co/npm/globalthis.png?downloads=true&stars=true
63
+ [license-image]: https://img.shields.io/npm/l/globalthis.svg
64
+ [license-url]: LICENSE
65
+ [downloads-image]: https://img.shields.io/npm/dm/globalthis.svg
66
+ [downloads-url]: https://npm-stat.com/charts.html?package=globalthis
67
+ [codecov-image]: https://codecov.io/gh/es-shims/globalThis/branch/main/graphs/badge.svg
68
+ [codecov-url]: https://app.codecov.io/gh/es-shims/globalThis/
69
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/globalThis
70
+ [actions-url]: https://github.com/es-shims/globalThis/actions
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ require('./shim')();
@@ -0,0 +1,11 @@
1
+ /* eslint no-negated-condition: 0, no-new-func: 0 */
2
+
3
+ 'use strict';
4
+
5
+ if (typeof self !== 'undefined') {
6
+ module.exports = self;
7
+ } else if (typeof window !== 'undefined') {
8
+ module.exports = window;
9
+ } else {
10
+ module.exports = Function('return this')();
11
+ }
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = global;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var defineProperties = require('define-properties');
4
+
5
+ var implementation = require('./implementation');
6
+ var getPolyfill = require('./polyfill');
7
+ var shim = require('./shim');
8
+
9
+ var polyfill = getPolyfill();
10
+
11
+ var getGlobal = function () { return polyfill; };
12
+
13
+ defineProperties(getGlobal, {
14
+ getPolyfill: getPolyfill,
15
+ implementation: implementation,
16
+ shim: shim
17
+ });
18
+
19
+ module.exports = getGlobal;
@@ -0,0 +1,99 @@
1
+ {
2
+ "name": "globalthis",
3
+ "version": "1.0.4",
4
+ "author": "Jordan Harband <ljharb@gmail.com>",
5
+ "funding": {
6
+ "url": "https://github.com/sponsors/ljharb"
7
+ },
8
+ "description": "ECMAScript spec-compliant polyfill/shim for `globalThis`",
9
+ "license": "MIT",
10
+ "main": "index.js",
11
+ "browser": {
12
+ "./implementation": "./implementation.browser.js"
13
+ },
14
+ "scripts": {
15
+ "prepack": "npmignore --auto --commentLines=autogenerated",
16
+ "prepublishOnly": "safe-publish-latest && npm run build",
17
+ "prepublish": "not-in-publish || npm run prepublishOnly",
18
+ "pretest": "npm run lint",
19
+ "test": "npm run --silent tests-only",
20
+ "posttest": "aud --production",
21
+ "tests-only": "nyc tape 'test/**/*.js'",
22
+ "lint": "eslint --ext=js,mjs .",
23
+ "postlint": "es-shim-api --bound --property",
24
+ "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js",
25
+ "version": "auto-changelog && git add CHANGELOG.md",
26
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git://github.com/ljharb/System.global.git"
31
+ },
32
+ "keywords": [
33
+ "window",
34
+ "self",
35
+ "global",
36
+ "globalThis",
37
+ "System.global",
38
+ "global object",
39
+ "global this value",
40
+ "ECMAScript",
41
+ "es-shim API",
42
+ "polyfill",
43
+ "shim"
44
+ ],
45
+ "dependencies": {
46
+ "define-properties": "^1.2.1",
47
+ "gopd": "^1.0.1"
48
+ },
49
+ "devDependencies": {
50
+ "@es-shims/api": "^2.5.0",
51
+ "@ljharb/eslint-config": "^21.1.0",
52
+ "aud": "^2.0.4",
53
+ "auto-changelog": "^2.4.0",
54
+ "browserify": "^16.5.2",
55
+ "eslint": "=8.8.0",
56
+ "for-each": "^0.3.3",
57
+ "in-publish": "^2.0.1",
58
+ "is": "^3.3.0",
59
+ "npmignore": "^0.3.1",
60
+ "nyc": "^10.3.2",
61
+ "safe-publish-latest": "^2.0.0",
62
+ "tape": "^5.7.5"
63
+ },
64
+ "testling": {
65
+ "files": "test/index.js",
66
+ "browsers": [
67
+ "iexplore/6.0..latest",
68
+ "firefox/3.0..6.0",
69
+ "firefox/15.0..latest",
70
+ "firefox/nightly",
71
+ "chrome/4.0..10.0",
72
+ "chrome/20.0..latest",
73
+ "chrome/canary",
74
+ "opera/10.0..latest",
75
+ "opera/next",
76
+ "safari/4.0..latest",
77
+ "ipad/6.0..latest",
78
+ "iphone/6.0..latest",
79
+ "android-browser/4.2"
80
+ ]
81
+ },
82
+ "engines": {
83
+ "node": ">= 0.4"
84
+ },
85
+ "auto-changelog": {
86
+ "output": "CHANGELOG.md",
87
+ "template": "keepachangelog",
88
+ "unreleased": false,
89
+ "commitLimit": false,
90
+ "backfillLimit": false,
91
+ "hideCredit": true
92
+ },
93
+ "publishConfig": {
94
+ "ignore": [
95
+ "browserShim.js",
96
+ ".github/workflows"
97
+ ]
98
+ }
99
+ }
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var implementation = require('./implementation');
4
+
5
+ module.exports = function getPolyfill() {
6
+ if (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {
7
+ return implementation;
8
+ }
9
+ return global;
10
+ };