├── auto.js
├── .npmrc
├── implementation.js
├── browserShim.js
├── .github
└── workflows
│ ├── node-pretest.yml
│ ├── rebase.yml
│ ├── require-allow-edits.yml
│ ├── node-aught.yml
│ └── node-tens.yml
├── .nycrc
├── test
├── index.js
├── implementation.js
├── native.js
├── shimmed.js
└── tests.js
├── .eslintrc
├── polyfill.js
├── implementation.browser.js
├── index.js
├── shim.js
├── .gitignore
├── LICENSE
├── README.md
├── package.json
└── CHANGELOG.md
/auto.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | require('./shim')();
4 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | package-lock=false
2 | allow-same-version=true
3 | message=v%s
4 |
--------------------------------------------------------------------------------
/implementation.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = global;
4 |
--------------------------------------------------------------------------------
/browserShim.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var systemGlobal = require('./');
4 |
5 | module.exports = systemGlobal.shim();
6 |
--------------------------------------------------------------------------------
/.github/workflows/node-pretest.yml:
--------------------------------------------------------------------------------
1 | name: 'Tests: pretest/posttest'
2 |
3 | on: [pull_request, push]
4 |
5 | jobs:
6 | tests:
7 | uses: ljharb/actions/.github/workflows/pretest.yml@main
8 |
--------------------------------------------------------------------------------
/.nycrc:
--------------------------------------------------------------------------------
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 | }
11 |
--------------------------------------------------------------------------------
/.github/workflows/rebase.yml:
--------------------------------------------------------------------------------
1 | name: Automatic Rebase
2 |
3 | on: [pull_request_target]
4 |
5 | jobs:
6 | _:
7 | uses: ljharb/actions/.github/workflows/rebase.yml@main
8 | secrets:
9 | token: ${{ secrets.GITHUB_TOKEN }}
10 |
--------------------------------------------------------------------------------
/test/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var systemGlobal = require('../');
4 | var test = require('tape');
5 | var runTests = require('./tests');
6 |
7 | test('as a function', function (t) {
8 | runTests(systemGlobal(), t);
9 |
10 | t.end();
11 | });
12 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
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 | }
19 |
--------------------------------------------------------------------------------
/.github/workflows/require-allow-edits.yml:
--------------------------------------------------------------------------------
1 | name: Require “Allow Edits”
2 |
3 | on: [pull_request_target]
4 |
5 | jobs:
6 | _:
7 | name: "Require “Allow Edits”"
8 |
9 | runs-on: ubuntu-latest
10 |
11 | steps:
12 | - uses: ljharb/require-allow-edits@main
13 |
--------------------------------------------------------------------------------
/test/implementation.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var implementation = require('../implementation');
4 | var test = require('tape');
5 | var runTests = require('./tests');
6 |
7 | test('implementation', function (t) {
8 | runTests(implementation, t);
9 |
10 | t.end();
11 | });
12 |
--------------------------------------------------------------------------------
/.github/workflows/node-aught.yml:
--------------------------------------------------------------------------------
1 | name: 'Tests: node.js < 10'
2 |
3 | on: [pull_request, push]
4 |
5 | jobs:
6 | tests:
7 | uses: ljharb/actions/.github/workflows/node.yml@main
8 | with:
9 | range: '< 10'
10 | type: minors
11 | command: npm run tests-only
12 |
--------------------------------------------------------------------------------
/.github/workflows/node-tens.yml:
--------------------------------------------------------------------------------
1 | name: 'Tests: node.js >= 10'
2 |
3 | on: [pull_request, push]
4 |
5 | jobs:
6 | tests:
7 | uses: ljharb/actions/.github/workflows/node.yml@main
8 | with:
9 | range: '>= 10'
10 | type: minors
11 | command: npm run tests-only
12 |
--------------------------------------------------------------------------------
/polyfill.js:
--------------------------------------------------------------------------------
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 | };
11 |
--------------------------------------------------------------------------------
/implementation.browser.js:
--------------------------------------------------------------------------------
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 | }
12 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
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;
20 |
--------------------------------------------------------------------------------
/shim.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var define = require('define-properties');
4 | var gOPD = require('gopd');
5 | var getPolyfill = require('./polyfill');
6 |
7 | module.exports = function shimGlobal() {
8 | var polyfill = getPolyfill();
9 | if (define.supportsDescriptors) {
10 | var descriptor = gOPD(polyfill, 'globalThis');
11 | if (
12 | !descriptor
13 | || (
14 | descriptor.configurable
15 | && (descriptor.enumerable || !descriptor.writable || globalThis !== polyfill)
16 | )
17 | ) {
18 | Object.defineProperty(polyfill, 'globalThis', {
19 | configurable: true,
20 | enumerable: false,
21 | value: polyfill,
22 | writable: true
23 | });
24 | }
25 | } else if (typeof globalThis !== 'object' || globalThis !== polyfill) {
26 | polyfill.globalThis = polyfill;
27 | }
28 | return polyfill;
29 | };
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 |
11 | # Directory for instrumented libs generated by jscoverage/JSCover
12 | lib-cov
13 |
14 | # Coverage directory used by tools like istanbul
15 | coverage
16 | .nyc_output/
17 |
18 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
19 | .grunt
20 |
21 | # node-waf configuration
22 | .lock-wscript
23 |
24 | # Compiled binary addons (http://nodejs.org/api/addons.html)
25 | build/Release
26 |
27 | # Dependency directory
28 | node_modules
29 |
30 | # Optional npm cache directory
31 | .npm
32 |
33 | # Optional REPL history
34 | .node_repl_history
35 |
36 | dist/
37 |
38 | # Only apps should have lockfiles
39 | npm-shrinkwrap.json
40 | package-lock.json
41 | yarn.lock
42 |
43 | .npmignore
44 |
--------------------------------------------------------------------------------
/test/native.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var test = require('tape');
4 | var defineProperties = require('define-properties');
5 | var isEnumerable = Object.prototype.propertyIsEnumerable;
6 |
7 | var missing = {};
8 | var theGlobal = typeof globalThis === 'object' ? globalThis : missing;
9 |
10 | var runTests = require('./tests');
11 |
12 | test('native', { todo: theGlobal === missing }, function (t) {
13 | if (theGlobal !== missing) {
14 | t.equal(typeof theGlobal, 'object', 'globalThis is an object');
15 | t.equal('globalThis' in theGlobal, true, 'globalThis is in globalThis');
16 |
17 | t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
18 | et.equal(false, isEnumerable.call(theGlobal, 'globalThis'), 'globalThis is not enumerable');
19 | et.end();
20 | });
21 |
22 | runTests(theGlobal, t);
23 | }
24 |
25 | t.end();
26 | });
27 |
--------------------------------------------------------------------------------
/test/shimmed.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | require('../auto');
4 |
5 | var test = require('tape');
6 | var defineProperties = require('define-properties');
7 | var isEnumerable = Object.prototype.propertyIsEnumerable;
8 |
9 | var runTests = require('./tests');
10 |
11 | test('shimmed', function (t) {
12 | t.equal(typeof globalThis, 'object', 'globalThis is an object');
13 | t.equal('globalThis' in globalThis, true, 'globalThis is in globalThis');
14 |
15 | t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
16 | et.equal(false, isEnumerable.call(globalThis, 'globalThis'), 'globalThis.globalThis is not enumerable');
17 | et.end();
18 | });
19 |
20 | t.test('writability', { skip: !defineProperties.supportsDescriptors }, function (wt) {
21 | var desc = Object.getOwnPropertyDescriptor(globalThis, 'globalThis');
22 | wt.equal(desc.writable, true, 'globalThis.globalThis is writable');
23 | wt.end();
24 | });
25 |
26 | runTests(globalThis.globalThis, t);
27 |
28 | t.end();
29 | });
30 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
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.
22 |
--------------------------------------------------------------------------------
/test/tests.js:
--------------------------------------------------------------------------------
1 | /* jscs:disable requireUseStrict */
2 | /* eslint strict: 0, max-statements: 0 */
3 |
4 | module.exports = function (theGlobal, t) {
5 | t.equal(typeof theGlobal, 'object', 'is an object');
6 |
7 | t.test('built-in globals', function (st) {
8 | st.equal(theGlobal.Math, Math, 'Math is on the global');
9 | st.equal(theGlobal.JSON, JSON, 'JSON is on the global');
10 | st.equal(theGlobal.String, String, 'String is on the global');
11 | st.equal(theGlobal.Array, Array, 'Array is on the global');
12 | st.equal(theGlobal.Number, Number, 'Number is on the global');
13 | st.equal(theGlobal.Boolean, Boolean, 'Boolean is on the global');
14 | st.equal(theGlobal.Object, Object, 'Object is on the global');
15 | st.equal(theGlobal.Function, Function, 'Function is on the global');
16 | st.equal(theGlobal.Date, Date, 'Date is on the global');
17 | st.equal(theGlobal.RegExp, RegExp, 'RegExp is on the global');
18 |
19 | if (typeof Symbol === 'undefined') {
20 | st.comment('# SKIP Symbol is not supported');
21 | } else {
22 | st.equal(theGlobal.Symbol, Symbol, 'Symbol is on the global');
23 | }
24 | st.end();
25 | });
26 |
27 | t.test('custom property', function (st) {
28 | var key = 'random_custom_key_' + new Date().getTime();
29 | var semaphore = {};
30 | /* eslint no-eval: 1 */
31 | eval(key + ' = semaphore;');
32 | st.equal(theGlobal[key], semaphore, 'global variable ends up on the global object');
33 | delete theGlobal[key]; // eslint-disable-line no-param-reassign
34 | st.end();
35 | });
36 | };
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # globalThis [![Version Badge][npm-version-svg]][npm-url]
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
71 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "globalthis",
3 | "version": "1.0.4",
4 | "author": "Jordan Harband ",
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": "npx npm@\">= 10.2\" audit --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.2.0"
48 | },
49 | "devDependencies": {
50 | "@es-shims/api": "^2.5.1",
51 | "@ljharb/eslint-config": "^21.2.0",
52 | "auto-changelog": "^2.5.0",
53 | "browserify": "^16.5.2",
54 | "encoding": "^0.1.13",
55 | "eslint": "=8.8.0",
56 | "for-each": "^0.3.5",
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.9.0"
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 | }
100 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
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)
110 |
--------------------------------------------------------------------------------