Skip to content

Commit

Permalink
chore: add exports field to all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Oct 23, 2020
1 parent 399c7b3 commit c6a1831
Show file tree
Hide file tree
Showing 55 changed files with 376 additions and 199 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Chore & Maintenance

- `[*]` [**BREAKING**] Add `exports` field to all `package.json`s ([#9921](https://github.com/facebook/jest/pull/9921))

### Performance

## 26.6.1
Expand Down
6 changes: 1 addition & 5 deletions e2e/custom-resolver/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

const {
default: defaultResolver,
} = require('jest-resolve/build/defaultResolver');

const exportedModules = new Map([
['foo', 'foo'],
['bar', 'bar'],
Expand All @@ -20,6 +16,6 @@ module.exports = (name, options) => {
if (resolution) {
return `${__dirname}/${resolution}.js`;
} else {
return defaultResolver(name, options);
return options.defaultResolver(name, options);
}
};
11 changes: 7 additions & 4 deletions packages/babel-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
"directory": "packages/babel-jest"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"dependencies": {
"@jest/transform": "^26.6.1",
"@jest/types": "^26.6.1",
Expand All @@ -32,6 +36,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/babel-plugin-jest-hoist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
"node": ">= 10.14.2"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"dependencies": {
"@babel/template": "^7.3.3",
"@babel/types": "^7.3.3",
Expand All @@ -24,6 +28,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
9 changes: 6 additions & 3 deletions packages/babel-preset-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
"directory": "packages/babel-preset-jest"
},
"license": "MIT",
"main": "index.js",
"main": "./index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"dependencies": {
"babel-plugin-jest-hoist": "^26.5.0",
"babel-preset-current-node-syntax": "^0.1.3"
Expand All @@ -20,6 +24,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/diff-sequences/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
"engines": {
"node": ">= 10.14.2"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"scripts": {
"perf": "node --expose-gc perf/index.js"
},
Expand All @@ -30,6 +34,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
8 changes: 6 additions & 2 deletions packages/eslint-config-fb-strict/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"directory": "packages/eslint-config-fb-strict"
},
"license": "MIT",
"main": "./index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"dependencies": {
"eslint-config-fbjs": "^3.1.1"
},
Expand All @@ -24,6 +29,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
12 changes: 8 additions & 4 deletions packages/expect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
"directory": "packages/expect"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json",
"./build/utils": "./build/utils.js"
},
"dependencies": {
"@jest/types": "^26.6.1",
"ansi-styles": "^4.0.0",
Expand All @@ -28,6 +33,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/jest-changed-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"directory": "packages/jest-changed-files"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"dependencies": {
"@jest/types": "^26.6.1",
"execa": "^4.0.0",
Expand All @@ -19,6 +23,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
13 changes: 9 additions & 4 deletions packages/jest-circus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
"directory": "packages/jest-circus"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json",
"./runner": "./runner.js",
"./runner.js": "./runner.js"
},
"dependencies": {
"@babel/traverse": "^7.1.0",
"@jest/environment": "^26.6.1",
Expand Down Expand Up @@ -49,6 +55,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
12 changes: 8 additions & 4 deletions packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
"name": "jest-cli",
"description": "Delightful JavaScript Testing.",
"version": "26.6.1",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json",
"./bin/jest.js": "./bin/jest.js"
},
"dependencies": {
"@jest/core": "^26.6.1",
"@jest/test-result": "^26.6.1",
Expand Down Expand Up @@ -71,6 +76,5 @@
],
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/jest-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"directory": "packages/jest-config"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"peerDependencies": {
"ts-node": ">=9.0.0"
},
Expand Down Expand Up @@ -50,6 +54,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/jest-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"directory": "packages/jest-console"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"dependencies": {
"@jest/types": "^26.6.1",
"@types/node": "*",
Expand All @@ -25,6 +29,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/jest-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"name": "@jest/core",
"description": "Delightful JavaScript Testing.",
"version": "26.6.1",
"main": "build/jest.js",
"types": "build/jest.d.ts",
"main": "./build/jest.js",
"types": "./build/jest.d.ts",
"exports": {
".": "./build/jest.js",
"./package.json": "./package.json"
},
"dependencies": {
"@jest/console": "^26.6.1",
"@jest/reporters": "^26.6.1",
Expand Down Expand Up @@ -83,6 +87,5 @@
],
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/jest-create-cache-key-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
"node": ">= 10.14.2"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/jest-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"directory": "packages/jest-diff"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"dependencies": {
"chalk": "^4.0.0",
"diff-sequences": "^26.5.0",
Expand All @@ -24,6 +28,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/jest-docblock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"directory": "packages/jest-docblock"
},
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"dependencies": {
"detect-newline": "^3.0.0"
},
Expand All @@ -20,6 +24,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
11 changes: 7 additions & 4 deletions packages/jest-each/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"name": "jest-each",
"version": "26.6.1",
"description": "Parameterised tests for Jest",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": "./build/index.js",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "https://github.com/facebook/jest.git",
Expand All @@ -29,6 +33,5 @@
},
"publishConfig": {
"access": "public"
},
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638"
}
}
Loading

0 comments on commit c6a1831

Please sign in to comment.