Skip to content

Commit

Permalink
chore: convert global to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Dec 29, 2023
1 parent a85a66f commit 88fecf2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions lib/global.cjs → lib/global.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

/**
* A reference to the global object
* @type {object} globalObject
Expand All @@ -18,4 +16,4 @@ if (typeof global !== "undefined") {
globalObject = self;
}

module.exports = globalObject;
export default globalObject;
6 changes: 3 additions & 3 deletions lib/global.test.cjs → lib/global.test.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
import pkg from "@sinonjs/referee-sinon";
const assert = pkg.assert;

var assert = require("@sinonjs/referee-sinon").assert;
var globalObject = require("./global.cjs");
import globalObject from "./global.mjs";

describe("global", function () {
before(function () {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import global from "./global.cjs";
import global from "./global.mjs";
import calledInOrder from "./called-in-order.mjs";
import className from "./class-name.mjs";
import * as deprecated from "./deprecated.js";
Expand Down

0 comments on commit 88fecf2

Please sign in to comment.