From afa63f3b21a672a662eed42fd82368fa4623be69 Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Tue, 14 Feb 2023 18:13:16 +0000 Subject: [PATCH] chore: drop commonjs support --- package.json | 13 ++----------- test/commonjs.cjs | 11 ----------- 2 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 test/commonjs.cjs diff --git a/package.json b/package.json index c0dae07d..f5662f64 100644 --- a/package.json +++ b/package.json @@ -27,22 +27,13 @@ "url": "https://github.com/chaijs/chai/issues" }, "main": "./chai.js", - "exports": { - ".": { - "require": "./chai.cjs", - "import": "./chai.js" - }, - "./*": "./*" - }, "scripts": { "prebuild": "npm run clean", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "esbuild --bundle --format=cjs --keep-names --outfile=chai.cjs index.js", + "build": "npm run build:esm", "build:esm": "esbuild --bundle --format=esm --keep-names --outfile=chai.js index.js", "pretest": "npm run build", - "test": "npm run test-node && npm run test-cjs && npm run test-chrome", + "test": "npm run test-node && npm run test-chrome", "test-node": "mocha --require ./test/bootstrap/index.js --reporter dot test/*.js", - "test-cjs": "mocha --require ./test/bootstrap/index.js --reporter dot test/*.cjs", "test-chrome": "karma start karma.conf.cjs --single-run --browsers HeadlessChrome", "test-firefox": "karma start karma.conf.cjs --browsers Firefox", "test-cov": "istanbul cover ./node_modules/.bin/_mocha -- --require ./test/bootstrap/index.js test/*.js", diff --git a/test/commonjs.cjs b/test/commonjs.cjs deleted file mode 100644 index ff4b15f4..00000000 --- a/test/commonjs.cjs +++ /dev/null @@ -1,11 +0,0 @@ -const {expect, should} = require('chai'); -const chai = require('chai'); -require('chai/register-assert.cjs'); -should() - -it('expect and should are CJS named exports and chai is a default export', () => { - expect(4).to.equal(4); - "s".should.equal("s"); - chai.expect(4).to.equal(4); - assert.equal(4, 4); -})