From c25e2674b73a40adc6384613e150f6d063b993bc Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 5 Oct 2021 16:42:22 +0200 Subject: [PATCH 1/3] chore(expect): expose default matchers --- CHANGELOG.md | 2 ++ packages/expect/package.json | 3 ++- scripts/buildUtils.js | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6fc46417d28..9a38aff3f8e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ ### Chore & Maintenance +- `[expect]` Expose default matchers ([#11932](https://github.com/facebook/jest/pull/11932)) + ### Performance ## 27.2.4 diff --git a/packages/expect/package.json b/packages/expect/package.json index f2b21358fa6f..c8da2ec46ea0 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -12,7 +12,8 @@ "exports": { ".": "./build/index.js", "./package.json": "./package.json", - "./build/utils": "./build/utils.js" + "./build/utils": "./build/utils.js", + "./build/matchers": "./build/matchers.js" }, "dependencies": { "@jest/types": "^27.2.4", diff --git a/scripts/buildUtils.js b/scripts/buildUtils.js index a8de3889814e..1f822a9bf3ab 100644 --- a/scripts/buildUtils.js +++ b/scripts/buildUtils.js @@ -52,7 +52,10 @@ module.exports.getPackages = function getPackages() { {}, ), ...(pkg.name === 'jest-circus' ? {'./runner': './runner.js'} : {}), - ...(pkg.name === 'expect' ? {'./build/utils': './build/utils.js'} : {}), + ...(pkg.name === 'expect' ? { + './build/utils': './build/utils.js', + './build/matchers': './build/matchers.js', + } : {}), }, `Package ${pkg.name} does not export correct files`, ); From 82179a293d29e91aaf58b7e3bc61d96a1b8be343 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 5 Oct 2021 17:48:52 +0200 Subject: [PATCH 2/3] Update CHANGELOG.md just to maybe trigger ci --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a38aff3f8e6..8ac6736c3d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ ### Chore & Maintenance -- `[expect]` Expose default matchers ([#11932](https://github.com/facebook/jest/pull/11932)) +- `[expect]` Export default matchers ([#11932](https://github.com/facebook/jest/pull/11932)) ### Performance From cd8ffe4326c2b5602c6e7993c19149e300cec28b Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 5 Oct 2021 19:16:57 +0200 Subject: [PATCH 3/3] chore: fix lint --- scripts/buildUtils.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/buildUtils.js b/scripts/buildUtils.js index 1f822a9bf3ab..29f286e11f1e 100644 --- a/scripts/buildUtils.js +++ b/scripts/buildUtils.js @@ -52,10 +52,12 @@ module.exports.getPackages = function getPackages() { {}, ), ...(pkg.name === 'jest-circus' ? {'./runner': './runner.js'} : {}), - ...(pkg.name === 'expect' ? { - './build/utils': './build/utils.js', - './build/matchers': './build/matchers.js', - } : {}), + ...(pkg.name === 'expect' + ? { + './build/matchers': './build/matchers.js', + './build/utils': './build/utils.js', + } + : {}), }, `Package ${pkg.name} does not export correct files`, );