From 748cca6d12f8b1744a6017c09395725bdbb4a118 Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Sun, 12 Feb 2023 17:45:00 +0100 Subject: [PATCH] chore: prepare `@flarum/jest-config` for release Signed-off-by: Sami Mazouz --- flarum-monorepo.json | 15 ++++++++++----- framework/core/js/jest.config.cjs | 2 +- framework/core/js/package.json | 2 +- framework/core/js/tsconfig.test.json | 2 +- js-packages/jest-config/README.md | 6 +++--- js-packages/jest-config/package.json | 2 +- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/flarum-monorepo.json b/flarum-monorepo.json index cf027c922..f814cd126 100644 --- a/flarum-monorepo.json +++ b/flarum-monorepo.json @@ -110,11 +110,16 @@ } ], "npm": [ - { - "name": "prettier-config", - "gitRemote": "git@github.com:flarum/prettier-config.git", - "mainBranch": "main" - }, + { + "name": "jest-config", + "gitRemote": "git@github.com:flarum/jest-config.git", + "mainBranch": "main" + }, + { + "name": "prettier-config", + "gitRemote": "git@github.com:flarum/prettier-config.git", + "mainBranch": "main" + }, { "name": "webpack-config", "gitRemote": "git@github.com:flarum/flarum-webpack-config.git", diff --git a/framework/core/js/jest.config.cjs b/framework/core/js/jest.config.cjs index 1b1ff7e62..a2d3d0f14 100644 --- a/framework/core/js/jest.config.cjs +++ b/framework/core/js/jest.config.cjs @@ -1 +1 @@ -module.exports = require('flarum-jest-config')({}); +module.exports = require('@flarum/jest-config')({}); diff --git a/framework/core/js/package.json b/framework/core/js/package.json index b6e1dbca5..fedc66686 100644 --- a/framework/core/js/package.json +++ b/framework/core/js/package.json @@ -22,6 +22,7 @@ "throttle-debounce": "^3.0.1" }, "devDependencies": { + "@flarum/jest-config": "^1.0.0", "@flarum/prettier-config": "^1.0.0", "@types/body-scroll-lock": "^3.1.0", "@types/jquery": "^3.5.10", @@ -31,7 +32,6 @@ "bundlewatch": "^0.3.2", "cross-env": "^7.0.3", "expose-loader": "^3.1.0", - "flarum-jest-config": "^1.0.0", "flarum-tsconfig": "^1.0.2", "flarum-webpack-config": "^2.0.0", "prettier": "^2.5.1", diff --git a/framework/core/js/tsconfig.test.json b/framework/core/js/tsconfig.test.json index 7e3ca79b3..96c11bf69 100644 --- a/framework/core/js/tsconfig.test.json +++ b/framework/core/js/tsconfig.test.json @@ -1,5 +1,5 @@ { "extends": "./tsconfig.json", "include": ["tests/**/*"], - "files": ["../../../node_modules/flarum-jest-config/shims.d.ts"] + "files": ["../../../node_modules/@flarum/jest-config/shims.d.ts"] } diff --git a/js-packages/jest-config/README.md b/js-packages/jest-config/README.md index bf3a052ff..5b1b3b48a 100755 --- a/js-packages/jest-config/README.md +++ b/js-packages/jest-config/README.md @@ -4,19 +4,19 @@ This package provides a [Jest](https://jestjs.io/) config object to run unit & i ## 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 `"test": "yarn node --experimental-vm-modules $(yarn bin jest)"` to your `package.json` scripts * Rename `webpack.config.js` to `webpack.config.cjs` * Create a `jest.config.cjs` file with the following content: ```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: ```json { "extends": "./tsconfig.json", "include": ["tests/**/*"], - "files": ["../../../node_modules/flarum-jest-config/shims.d.ts"] + "files": ["../../../node_modules/@flarum/jest-config/shims.d.ts"] } ``` diff --git a/js-packages/jest-config/package.json b/js-packages/jest-config/package.json index 793d23e64..1ffff1896 100644 --- a/js-packages/jest-config/package.json +++ b/js-packages/jest-config/package.json @@ -1,5 +1,5 @@ { - "name": "flarum-jest-config", + "name": "@flarum/jest-config", "version": "1.0.0", "description": "Jest config for Flarum.", "main": "index.cjs",