chore: prepare @flarum/jest-config for release

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
Sami Mazouz 2023-02-12 17:45:00 +01:00
parent f4f8369dc0
commit 748cca6d12
No known key found for this signature in database
6 changed files with 17 additions and 12 deletions

View File

@ -110,11 +110,16 @@
} }
], ],
"npm": [ "npm": [
{ {
"name": "prettier-config", "name": "jest-config",
"gitRemote": "git@github.com:flarum/prettier-config.git", "gitRemote": "git@github.com:flarum/jest-config.git",
"mainBranch": "main" "mainBranch": "main"
}, },
{
"name": "prettier-config",
"gitRemote": "git@github.com:flarum/prettier-config.git",
"mainBranch": "main"
},
{ {
"name": "webpack-config", "name": "webpack-config",
"gitRemote": "git@github.com:flarum/flarum-webpack-config.git", "gitRemote": "git@github.com:flarum/flarum-webpack-config.git",

View File

@ -1 +1 @@
module.exports = require('flarum-jest-config')({}); module.exports = require('@flarum/jest-config')({});

View File

@ -22,6 +22,7 @@
"throttle-debounce": "^3.0.1" "throttle-debounce": "^3.0.1"
}, },
"devDependencies": { "devDependencies": {
"@flarum/jest-config": "^1.0.0",
"@flarum/prettier-config": "^1.0.0", "@flarum/prettier-config": "^1.0.0",
"@types/body-scroll-lock": "^3.1.0", "@types/body-scroll-lock": "^3.1.0",
"@types/jquery": "^3.5.10", "@types/jquery": "^3.5.10",
@ -31,7 +32,6 @@
"bundlewatch": "^0.3.2", "bundlewatch": "^0.3.2",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"expose-loader": "^3.1.0", "expose-loader": "^3.1.0",
"flarum-jest-config": "^1.0.0",
"flarum-tsconfig": "^1.0.2", "flarum-tsconfig": "^1.0.2",
"flarum-webpack-config": "^2.0.0", "flarum-webpack-config": "^2.0.0",
"prettier": "^2.5.1", "prettier": "^2.5.1",

View File

@ -1,5 +1,5 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"include": ["tests/**/*"], "include": ["tests/**/*"],
"files": ["../../../node_modules/flarum-jest-config/shims.d.ts"] "files": ["../../../node_modules/@flarum/jest-config/shims.d.ts"]
} }

View File

@ -4,19 +4,19 @@ This package provides a [Jest](https://jestjs.io/) config object to run unit & i
## Usage ## Usage
* Install the package: `yarn add --dev flarum-jest-config` * Install the package: `yarn add --dev @flarum/jest-config`
* Add `"type": "module"` to your `package.json` * Add `"type": "module"` to your `package.json`
* Add `"test": "yarn node --experimental-vm-modules $(yarn bin jest)"` to your `package.json` scripts * Add `"test": "yarn node --experimental-vm-modules $(yarn bin jest)"` to your `package.json` scripts
* Rename `webpack.config.js` to `webpack.config.cjs` * Rename `webpack.config.js` to `webpack.config.cjs`
* Create a `jest.config.cjs` file with the following content: * Create a `jest.config.cjs` file with the following content:
```js ```js
module.exports = require('flarum-jest-config')(); module.exports = require('@flarum/jest-config')();
``` ```
* If you are using TypeScript, create `tsconfig.test.json` with the following content: * If you are using TypeScript, create `tsconfig.test.json` with the following content:
```json ```json
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"include": ["tests/**/*"], "include": ["tests/**/*"],
"files": ["../../../node_modules/flarum-jest-config/shims.d.ts"] "files": ["../../../node_modules/@flarum/jest-config/shims.d.ts"]
} }
``` ```

View File

@ -1,5 +1,5 @@
{ {
"name": "flarum-jest-config", "name": "@flarum/jest-config",
"version": "1.0.0", "version": "1.0.0",
"description": "Jest config for Flarum.", "description": "Jest config for Flarum.",
"main": "index.cjs", "main": "index.cjs",