0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

[WIP] Try pnpm

This commit is contained in:
Ronald Langeveld 2024-10-07 16:03:04 +01:00
parent 084022a30d
commit 31f7f2c0bb
168 changed files with 5415 additions and 32472 deletions

View file

@ -60,7 +60,7 @@ There is no need to include what modules have changed in the commit message, as
### Submitting Pull Requests
We aim to merge any straightforward, well-understood bug fixes or improvements immediately, as long as they pass our tests (run `yarn test` to check locally). We generally dont merge new features and larger changes without prior discussion with the core product team for tech/design specification.
We aim to merge any straightforward, well-understood bug fixes or improvements immediately, as long as they pass our tests (run `pnpm test` to check locally). We generally dont merge new features and larger changes without prior discussion with the core product team for tech/design specification.
Please provide plenty of context and reasoning around your changes, to help us merge quickly. Closing an already open issue is our preferred workflow. If your PR gets out of date, we may ask you to rebase as you are more familiar with your changes than we will be.

View file

@ -4,6 +4,6 @@ Please include a description of your change & check your PR against this list, t
- [ ] There's a clear use-case for this code change, explained below
- [ ] Commit message has a short title & references relevant issues
- [ ] The build will pass (run `yarn test:all` and `yarn lint`)
- [ ] The build will pass (run `pnpm test:all` and `pnpm lint`)
We appreciate your contribution!

View file

@ -5,7 +5,7 @@
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$GIT_BRANCH" = "main" ]; then
yarn lint-staged --relative
pnpm lint-staged --relative
lintStatus=$?
if [ $lintStatus -ne 0 ]; then

View file

@ -9,7 +9,7 @@ const concurrently = require('concurrently');
// check we're running on Node 18 and above
const nodeVersion = parseInt(process.versions.node.split('.')[0]);
if (nodeVersion < 18) {
console.error('`yarn dev` requires Node v18 or above. Please upgrade your version of Node.');
console.error('`pnpm dev` requires Node v18 or above. Please upgrade your version of Node.');
process.exit(1);
}
@ -232,8 +232,8 @@ async function handleStripe() {
}
process.env.NX_DISABLE_DB = "true";
await exec("yarn nx reset --onlyDaemon");
await exec("yarn nx daemon --start");
await exec("pnpm nx reset --onlyDaemon");
await exec("pnpm nx daemon --start");
console.log(`Running projects: ${commands.map(c => chalk.green(c.name)).join(', ')}`);
@ -247,7 +247,7 @@ async function handleStripe() {
} catch (err) {
console.error();
console.error(chalk.red(`Executing dev command failed:`) + `\n`);
console.error(chalk.red(`If you've recently done a \`yarn main\`, dependencies might be out of sync. Try running \`${chalk.green('yarn fix')}\` to fix this.`));
console.error(chalk.red(`If you've recently done a \`pnpm main\`, dependencies might be out of sync. Try running \`${chalk.green('pnpm fix')}\` to fix this.`));
console.error(chalk.red(`If not, something else went wrong. Please report this to the Ghost team.`));
console.error();
}

View file

@ -52,7 +52,7 @@ async function runAndStream(command, args, options) {
let mysqlSetup = false;
console.log(chalk.blue(`Attempting to setup MySQL via Docker`));
try {
await runAndStream('yarn', ['docker:reset'], {cwd: path.join(__dirname, '../../')});
await runAndStream('pnpm', ['docker:reset'], {cwd: path.join(__dirname, '../../')});
mysqlSetup = true;
} catch (err) {
console.error(chalk.red('Failed to run MySQL Docker container'), err);
@ -105,7 +105,7 @@ async function runAndStream(command, args, options) {
console.log(chalk.yellow(`Resetting Docker container`));
try {
await runAndStream('yarn', ['docker:reset'], {cwd: path.join(__dirname, '../../')});
await runAndStream('pnpm', ['docker:reset'], {cwd: path.join(__dirname, '../../')});
resetData = true;
} catch (err) {
console.error(chalk.red('Failed to run MySQL Docker container'), err);
@ -118,7 +118,7 @@ async function runAndStream(command, args, options) {
}
console.log(chalk.blue(`Running knex-migrator init`));
await runAndStream('yarn', ['knex-migrator', 'init'], {cwd: coreFolder});
await runAndStream('pnpm', ['knex-migrator', 'init'], {cwd: coreFolder});
if (process.argv.includes('--no-seed')) {
console.log(chalk.yellow(`Skipping seed data`));
console.log(chalk.yellow(`Done`));
@ -129,10 +129,10 @@ async function runAndStream(command, args, options) {
if (xxl) {
console.log(chalk.blue(`Resetting all data (with xxl)`));
await runAndStream('yarn', ['reset:data:xxl'], {cwd: rootFolder});
await runAndStream('pnpm', ['reset:data:xxl'], {cwd: rootFolder});
} else {
console.log(chalk.blue(`Resetting all data`));
await runAndStream('yarn', ['reset:data'], {cwd: rootFolder});
await runAndStream('pnpm', ['reset:data'], {cwd: rootFolder});
}
}
})();

View file

@ -91,7 +91,7 @@ jobs:
shared: &shared
- '.github/**'
- 'package.json'
- 'yarn.lock'
- 'pnpm.lock'
core:
- *shared
- 'ghost/**'
@ -126,10 +126,10 @@ jobs:
ref: ${{ env.HEAD_COMMIT }}
- name: Compute lockfile hash
run: echo "hash=lockfile-${{ hashFiles('yarn.lock') }}" >> "$GITHUB_ENV"
run: echo "hash=lockfile-${{ hashFiles('pnpm.lock') }}" >> "$GITHUB_ENV"
- name: Compute dependency cache key
run: echo "cachekey=dep-cache-${{ hashFiles('yarn.lock') }}-${{ env.HEAD_COMMIT }}" >> "$GITHUB_ENV"
run: echo "cachekey=dep-cache-${{ hashFiles('pnpm.lock') }}-${{ env.HEAD_COMMIT }}" >> "$GITHUB_ENV"
- name: Compute dependency cache restore key
run: |
@ -172,14 +172,14 @@ jobs:
FORCE_COLOR: 0
with:
node-version: '18.12.1'
cache: yarn
cache: pnpm
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile
- name: Build packages
if: steps.cache_built_packages.outputs.cache-hit != 'true'
run: yarn nx run-many -t build:ts
run: pnpm nx run-many -t build:ts
outputs:
changed_admin: ${{ steps.changed.outputs.admin }}
@ -223,7 +223,7 @@ jobs:
path: ghost/**/.eslintcache
key: eslint-cache
- run: yarn nx affected -t lint --base=${{ needs.job_setup.outputs.BASE_COMMIT }}
- run: pnpm nx affected -t lint --base=${{ needs.job_setup.outputs.BASE_COMMIT }}
- uses: tryghost/actions/actions/slack-build@main
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
@ -254,7 +254,7 @@ jobs:
DEPENDENCY_CACHE_KEY: ${{ needs.job_setup.outputs.dependency_cache_key }}
- name: Run i18n tests
run: yarn nx run @tryghost/i18n:test
run: pnpm nx run @tryghost/i18n:test
job_admin-tests:
runs-on: ubuntu-latest
@ -277,13 +277,13 @@ jobs:
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_setup.outputs.dependency_cache_key }}
- run: yarn nx run ghost-admin:test
- run: pnpm nx run ghost-admin:test
env:
BROWSER: Chrome
# Merge coverage reports and upload
- name: Merge Admin test coverage
run: yarn ember coverage-merge
run: pnpm ember coverage-merge
working-directory: ghost/admin
- uses: actions/upload-artifact@v4
with:
@ -315,7 +315,7 @@ jobs:
FORCE_COLOR: 0
with:
node-version: '18.x'
cache: yarn
cache: pnpm
- name: Install Stripe-CLI
run: |
@ -332,7 +332,7 @@ jobs:
- name: Run migrations
working-directory: ghost/core
run: yarn knex-migrator init
run: pnpm knex-migrator init
- name: Get Playwright version
id: playwright-version
@ -351,10 +351,10 @@ jobs:
run: npx playwright install-deps
- name: Build Admin
run: yarn nx run ghost-admin:build:dev
run: pnpm nx run ghost-admin:build:dev
- name: Run Playwright tests locally
run: yarn test:browser
run: pnpm test:browser
env:
CI: true
STRIPE_PUBLISHABLE_KEY: ${{ secrets.STRIPE_PUBLISHABLE_KEY }}
@ -445,7 +445,7 @@ jobs:
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_setup.outputs.dependency_cache_key }}
- run: yarn nx affected -t test:unit --base=${{ needs.job_setup.outputs.BASE_COMMIT }}
- run: pnpm nx affected -t test:unit --base=${{ needs.job_setup.outputs.BASE_COMMIT }}
- uses: actions/upload-artifact@v4
if: startsWith(matrix.node, '18')
@ -517,11 +517,11 @@ jobs:
- name: E2E tests
working-directory: ghost/core
run: yarn test:ci:e2e
run: pnpm test:ci:e2e
- name: Integration tests
working-directory: ghost/core
run: yarn test:ci:integration
run: pnpm test:ci:integration
# Get runtime in seconds for test suite
- name: Record test duration
@ -637,7 +637,7 @@ jobs:
- name: Regression tests
working-directory: ghost/core
run: yarn test:ci:regression
run: pnpm test:ci:regression
- uses: tryghost/actions/actions/slack-build@main
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
@ -682,7 +682,7 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps
- run: yarn nx run @tryghost/admin-x-settings:test:acceptance
- run: pnpm nx run @tryghost/admin-x-settings:test:acceptance
- name: Upload test results
if: always()
@ -735,7 +735,7 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps
- run: yarn nx run @tryghost/comments-ui:test
- run: pnpm nx run @tryghost/comments-ui:test
- name: Upload test results
if: always()
@ -788,7 +788,7 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps
- run: yarn nx run @tryghost/signup-form:test:e2e
- run: pnpm nx run @tryghost/signup-form:test:e2e
- name: Upload test results
if: always()
@ -1023,7 +1023,7 @@ jobs:
DEPENDENCY_CACHE_KEY: ${{ needs.job_setup.outputs.dependency_cache_key }}
- name: Build the package
run: yarn run nx build @tryghost/admin-x-activitypub
run: pnpm run nx build @tryghost/admin-x-activitypub
- name: Check if version changed
id: version_check

10
.gitignore vendored
View file

@ -4,8 +4,8 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
pnpm-error.log*
# Runtime data
pids
@ -62,8 +62,8 @@ typings/
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# pnpm Integrity file
.pnpm-integrity
# dotenv environment variables file
.env
@ -111,7 +111,7 @@ typings/
/ghost/core/LICENSE
/ghost/core/PRIVACY.md
/ghost/core/README.md
/ghost/core/yarn.lock
/ghost/core/pnpm.lock
# Test generated files
test/functional/*.png

View file

@ -19,13 +19,13 @@
"dev": "vite build --watch",
"dev:start": "vite",
"build": "tsc && vite build",
"lint": "yarn run lint:code && yarn run lint:test",
"lint": "pnpm run lint:code && pnpm run lint:test",
"lint:code": "eslint --ext .js,.ts,.cjs,.tsx --cache src",
"lint:test": "eslint -c test/.eslintrc.cjs --ext .js,.ts,.cjs,.tsx --cache test",
"test:unit": "tsc --noEmit && vitest run",
"test:acceptance": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
"test:acceptance:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 yarn test:acceptance --headed",
"test:acceptance:full": "ALL_BROWSERS=1 yarn test:acceptance",
"test:acceptance:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 pnpm test:acceptance --headed",
"test:acceptance:full": "ALL_BROWSERS=1 pnpm test:acceptance",
"preview": "vite preview"
},
"devDependencies": {

View file

@ -19,7 +19,7 @@
"dev": "vite build --watch",
"dev:start": "vite",
"build": "tsc && vite build",
"lint": "yarn run lint:code && yarn run lint:test",
"lint": "pnpm run lint:code && pnpm run lint:test",
"lint:code": "eslint --ext .js,.ts,.cjs,.tsx --cache src",
"lint:test": "eslint -c test/.eslintrc.cjs --ext .js,.ts,.cjs,.tsx --cache test",
"preview": "vite preview"

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -10,12 +10,12 @@
"sideEffects": false,
"scripts": {
"build": "tsc -p tsconfig.declaration.json && vite build",
"prepare": "yarn build",
"test": "yarn test:unit",
"test:unit": "yarn test:types && yarn nx build && vitest run",
"prepare": "pnpm build",
"test": "pnpm test:unit",
"test:unit": "pnpm test:types && pnpm nx build && vitest run",
"test:types": "tsc --noEmit",
"lint:code": "eslint --ext .js,.ts,.cjs,.tsx src/ --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.cjs --ext .js,.ts,.cjs,.tsx test/ --cache",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"

View file

@ -55,12 +55,12 @@
"sideEffects": false,
"scripts": {
"build": "tsc -p tsconfig.declaration.json && vite build",
"prepare": "yarn build",
"test": "yarn test:types && yarn test:unit",
"prepare": "pnpm build",
"test": "pnpm test:types && pnpm test:unit",
"test:types": "tsc --noEmit",
"test:unit": "vitest run --coverage",
"lint:code": "eslint --ext .js,.ts,.cjs,.tsx src/ --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.cjs --ext .js,.ts,.cjs,.tsx test/ --cache"
},
"files": [

View file

@ -51,7 +51,7 @@ export function adminXPlaywrightConfig(overrides: Partial<PlaywrightTestConfig>
/* Run local dev server before starting the tests */
webServer: {
command: `yarn dev:start`,
command: `pnpm dev:start`,
url: `http://localhost:${E2E_PORT}`,
reuseExistingServer: !process.env.CI,
timeout: 10000

View file

@ -21,8 +21,8 @@
"test": "gscan .",
"test:ci": "gscan --fatal --verbose .",
"pretest": "gulp build",
"preship": "yarn test",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
"preship": "pnpm test",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
"postship": "git fetch && gulp release"
},
"author": {

View file

@ -6,15 +6,15 @@ Ghost Admin Settings in React
### Pre-requisites
- Run `yarn` in Ghost monorepo root
- Run `pnpm` in Ghost monorepo root
### Running the development version
Run `yarn dev` to start the development server to test/develop the settings standalone. This will generate a demo site from the `index.html` file which renders the app and makes it available on http://localhost:5173
Run `pnpm dev` to start the development server to test/develop the settings standalone. This will generate a demo site from the `index.html` file which renders the app and makes it available on http://localhost:5173
### Running inside Admin
Run `yarn dev` (like you would run Ghost dev normally) from the top-level repo. AdminX will automatically rebuild when you make changes.
Run `pnpm dev` (like you would run Ghost dev normally) from the top-level repo. AdminX will automatically rebuild when you make changes.
## Develop
@ -22,14 +22,14 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test:acceptance` runs acceptance tests
- `yarn test:unit` runs unit tests
- `yarn test:acceptance path/to/test` runs a specific test
- `yarn test:acceptance:slowmo` runs acceptance tests in slow motion and headed mode, useful for debugging and developing tests
- `pnpm lint` run just eslint
- `pnpm test:acceptance` runs acceptance tests
- `pnpm test:unit` runs unit tests
- `pnpm test:acceptance path/to/test` runs a specific test
- `pnpm test:acceptance:slowmo` runs acceptance tests in slow motion and headed mode, useful for debugging and developing tests

View file

@ -25,12 +25,12 @@
"dev": "vite build --watch",
"dev:start": "vite",
"build": "tsc && vite build",
"lint": "yarn run lint:js",
"lint": "pnpm run lint:js",
"lint:js": "eslint --ext .js,.ts,.cjs,.tsx --cache src test",
"test:unit": "yarn nx build && vitest run",
"test:unit": "pnpm nx build && vitest run",
"test:acceptance": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
"test:acceptance:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 yarn test:acceptance --headed",
"test:acceptance:full": "ALL_BROWSERS=1 yarn test:acceptance",
"test:acceptance:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 pnpm test:acceptance --headed",
"test:acceptance:full": "ALL_BROWSERS=1 pnpm test:acceptance",
"preview": "vite preview"
},
"dependencies": {

View file

@ -4,12 +4,12 @@
### Pre-requisites
- Run `yarn` in Ghost monorepo root
- Run `yarn` in this directory
- Run `pnpm` in Ghost monorepo root
- Run `pnpm` in this directory
### Running via Ghost `yarn dev` in root folder
### Running via Ghost `pnpm dev` in root folder
You can automatically start the announcement-bar dev server when developing Ghost by running Ghost (in root folder) via `yarn dev --announcementbar`.
You can automatically start the announcement-bar dev server when developing Ghost by running Ghost (in root folder) via `pnpm dev --announcementbar`.
# Copyright & License

View file

@ -22,17 +22,17 @@
"react-dom": "17.0.2"
},
"scripts": {
"dev": "concurrently \"vite preview -l silent\" \"yarn build:watch\"",
"dev": "concurrently \"vite preview -l silent\" \"pnpm build:watch\"",
"build": "vite build",
"build:watch": "vite build --watch",
"test": "vitest run",
"test:ci": "yarn test --coverage",
"test:unit": "yarn test:ci",
"test:ci": "pnpm test --coverage",
"test:unit": "pnpm test:ci",
"lint": "eslint src --ext .js --cache",
"preship": "yarn lint",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version; fi",
"preship": "pnpm lint",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version; fi",
"postship": "git push ${GHOST_UPSTREAM:-origin} --follow-tags && npm publish",
"prepublishOnly": "yarn build"
"prepublishOnly": "pnpm build"
},
"eslintConfig": {
"env": {

View file

@ -6,11 +6,11 @@ Comments widget that is embedded at the bottom of posts in Ghost.
### Pre-requisites
- Run `yarn` in Ghost monorepo root
- Run `pnpm` in Ghost monorepo root
### Running via Ghost `yarn dev` in root folder
### Running via Ghost `pnpm dev` in root folder
You can automatically start the comments dev server when developing Ghost by running Ghost (in root folder) via `yarn dev --all` or `yarn dev --comments`. This will host the comments JavaScript files, and makes sure that Ghost uses these locally hosted assets instead of the ones from the CDN.
You can automatically start the comments dev server when developing Ghost by running Ghost (in root folder) via `pnpm dev --all` or `pnpm dev --comments`. This will host the comments JavaScript files, and makes sure that Ghost uses these locally hosted assets instead of the ones from the CDN.
## Release
@ -18,13 +18,13 @@ A patch release can be rolled out instantly in production, whereas a minor/major
### Patch release
1. Run `yarn ship` and select a patch version when prompted
1. Run `pnpm ship` and select a patch version when prompted
2. (Optional) Clear JsDelivr cache to get the new version out instantly ([docs](https://www.notion.so/ghost/How-to-clear-jsDelivr-CDN-cache-2930bdbac02946eca07ac23ab3199bfa?pvs=4)). Typically, you'll need to open `https://purge.jsdelivr.net/ghost/comments-ui@~${COMMENTS_UI_VERSION}/umd/comments-ui.min.js` and
`https://purge.jsdelivr.net/ghost/comments-ui@~${COMMENTS_UI_VERSION}/umd/main.css` in your browser, where `COMMENTS_UI_VERSION` is the latest minor version in `ghost/core/core/shared/config/defaults.json` ([code](https://github.com/TryGhost/Ghost/blob/0aef3d3beeebcd79a4bfd3ad27e0ac67554b5744/ghost/core/core/shared/config/defaults.json#L198))
### Minor / major release
1. Run `yarn ship` and select a minor or major version when prompted
1. Run `pnpm ship` and select a minor or major version when prompted
2. Update the Comments UI version in `ghost/core/core/shared/config/defaults.json` to the new minor or major version ([code](https://github.com/TryGhost/Ghost/blob/0aef3d3beeebcd79a4bfd3ad27e0ac67554b5744/ghost/core/core/shared/config/defaults.json#L198))
3. Wait until a new version of Ghost is released

View file

@ -15,20 +15,20 @@
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"dev": "concurrently \"yarn preview --host -l silent\" \"yarn build:watch\"",
"dev": "concurrently \"pnpm preview --host -l silent\" \"pnpm build:watch\"",
"dev:test": "vite build && vite preview --port 7175",
"build": "vite build",
"build:watch": "vite build --watch",
"preview": "vite preview",
"test": "vitest run --coverage && yarn test:e2e",
"test": "vitest run --coverage && pnpm test:e2e",
"test:e2e": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
"test:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=1000 yarn test:e2e --headed",
"test:e2e:full": "ALL_BROWSERS=1 yarn test:e2e",
"test:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=1000 pnpm test:e2e --headed",
"test:e2e:full": "ALL_BROWSERS=1 pnpm test:e2e",
"lint": "eslint src --ext .js,.ts,.jsx,.tsx --cache",
"preship": "yarn lint",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version; fi",
"preship": "pnpm lint",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version; fi",
"postship": "git push ${GHOST_UPSTREAM:-origin} --follow-tags && npm publish",
"prepublishOnly": "yarn build"
"prepublishOnly": "pnpm build"
},
"browserslist": {
"production": [

View file

@ -54,7 +54,7 @@ export default defineConfig({
/* Run local dev server before starting the tests */
webServer: {
command: `yarn dev:test`,
command: `pnpm dev:test`,
url: `http://localhost:${E2E_PORT}/comments-ui.min.js`,
reuseExistingServer: !process.env.CI,
timeout: 20000

View file

@ -30,37 +30,37 @@ Refer the [docs](https://ghost.org/help/setup-members/#customize-portal-settings
Run Portal within the Ghost monorepo with:
```
yarn dev --portal
pnpm dev --portal
```
Alternatively, use `yarn dev --all` to load Portal and other supported apps/services, see [dev.js](https://github.com/TryGhost/Ghost/blob/main/.github/scripts/dev.js) for more information.
Alternatively, use `pnpm dev --all` to load Portal and other supported apps/services, see [dev.js](https://github.com/TryGhost/Ghost/blob/main/.github/scripts/dev.js) for more information.
---
To run Portal in a standalone fashion, use `yarn start` and open [http://localhost:3000](http://localhost:3000).
To run Portal in a standalone fashion, use `pnpm start` and open [http://localhost:3000](http://localhost:3000).
## Build
To create a production minified bundle in `umd/portal.min.js`:
```
yarn build
pnpm build
```
## Test
To run tests in watch mode:
```
yarn test
pnpm test
```
### Ghost e2e browser tests
Portal is primarily tested via Ghost's e2e browser tests. In order to test against your local changes rather than the last published package on npm you need to have the local portal build being served and to configure Ghost to use the local URL.
1. Run `yarn dev` in `ghost/apps/portal` to serve the local portal build on http://localhost:4175/portal.min.js
1. Run `pnpm dev` in `ghost/apps/portal` to serve the local portal build on http://localhost:4175/portal.min.js
2. Run the Ghost e2e tests in `ghost/core`, providing an ENV variable to override the portal URL:
```
portal__url=http://localhost:4175/portal.min.js STRIPE_ACCOUNT_ID=acct_xxx STRIPE_PUBLISHABLE_KEY=pk_test_xxx STRIPE_SECRET_KEY=sk_test_xxx yarn test:browser:portal
portal__url=http://localhost:4175/portal.min.js STRIPE_ACCOUNT_ID=acct_xxx STRIPE_PUBLISHABLE_KEY=pk_test_xxx STRIPE_SECRET_KEY=sk_test_xxx pnpm test:browser:portal
```
## Release
@ -73,13 +73,13 @@ In order to have Ghost's e2e tests run against the new code on CI or to test the
### Patch release
1. Run `yarn ship` and select a patch version when prompted
1. Run `pnpm ship` and select a patch version when prompted
2. (Optional) Clear JsDelivr cache to get the new version out instantly ([docs](https://www.notion.so/ghost/How-to-clear-jsDelivr-CDN-cache-2930bdbac02946eca07ac23ab3199bfa?pvs=4)). Typically, you'll need to open `https://purge.jsdelivr.net/ghost/portal@~${PORTAL_VERSION}/umd/portal.min.js` and
`https://purge.jsdelivr.net/ghost/portal@~${PORTAL_VERSION}/umd/main.css` in your browser, where `PORTAL_VERSION` is the latest minor version in `ghost/core/core/shared/config/defaults.json` ([code](https://github.com/TryGhost/Ghost/blob/0aef3d3beeebcd79a4bfd3ad27e0ac67554b5744/ghost/core/core/shared/config/defaults.json#L185))
### Minor / major release
1. Run `yarn ship` and select a minor or major version when prompted
1. Run `pnpm ship` and select a minor or major version when prompted
2. Update the Portal version in `ghost/core/core/shared/config/defaults.json` to the new minor or major version ([code](https://github.com/TryGhost/Ghost/blob/0aef3d3beeebcd79a4bfd3ad27e0ac67554b5744/ghost/core/core/shared/config/defaults.json#L198))
3. Wait until a new version of Ghost is released

View file

@ -17,18 +17,18 @@
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"dev": "concurrently \"yarn preview -l silent\" \"yarn build:watch\"",
"dev": "concurrently \"pnpm preview -l silent\" \"pnpm build:watch\"",
"build": "vite build",
"build:watch": "vite build --watch",
"preview": "vite preview",
"test": "vitest run",
"test:ci": "yarn test --coverage",
"test:unit": "yarn test:ci",
"test:ci": "pnpm test --coverage",
"test:unit": "pnpm test:ci",
"lint": "eslint src --ext .js --cache",
"preship": "yarn lint",
"ship": "STATUS=$(git status --porcelain .); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version; else echo \"Uncommitted changes found.\" && exit 1; fi",
"preship": "pnpm lint",
"ship": "STATUS=$(git status --porcelain .); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version; else echo \"Uncommitted changes found.\" && exit 1; fi",
"postship": "git push ${GHOST_UPSTREAM:-origin} --follow-tags && npm publish",
"prepublishOnly": "yarn build"
"prepublishOnly": "pnpm build"
},
"eslintConfig": {
"env": {

View file

@ -6,18 +6,18 @@ Embed a Ghost signup form on any site.
### Pre-requisites
- Run `yarn` in Ghost monorepo root
- Run `yarn` in this directory
- Run `pnpm` in Ghost monorepo root
- Run `pnpm` in this directory
### Running via Ghost `yarn dev` in root folder
### Running via Ghost `pnpm dev` in root folder
You can automatically start the signup-form dev server when developing Ghost by running Ghost (in root folder) via `yarn dev --all`. This will only build the production build, without the demo site.
You can automatically start the signup-form dev server when developing Ghost by running Ghost (in root folder) via `pnpm dev --all`. This will only build the production build, without the demo site.
Running via `yarn dev --all --signup` or `yarn dev --signup` will also serve the demo site on `http://localhost:6173`.
Running via `pnpm dev --all --signup` or `pnpm dev --signup` will also serve the demo site on `http://localhost:6173`.
### Running the development version only
Run `yarn dev` (in package folder) to start the development server to test/develop the form standalone.
Run `pnpm dev` (in package folder) to start the development server to test/develop the form standalone.
- This will generate a demo site on http://localhost:6173
- This will build and watch the production build and host it on http://localhost:6174/signup-form.min.js (different port!)
@ -33,13 +33,13 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `yarn test:e2e` run e2e tests on Chromium
- `yarn test:slowmo` run e2e tests visually (headed) and slower on Chromium
- `yarn test:e2e:full` run e2e tests on all browsers
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests
- `pnpm test:e2e` run e2e tests on Chromium
- `pnpm test:slowmo` run e2e tests visually (headed) and slower on Chromium
- `pnpm test:e2e:full` run e2e tests on all browsers

View file

@ -21,18 +21,18 @@
"preview": "concurrently \"vite preview -l silent\" \"vite build --watch\"",
"dev:test": "vite build && vite preview --port 6175",
"build": "concurrently \"tsc\" \"vite build\"",
"lint": "yarn run lint:js",
"lint": "pnpm run lint:js",
"lint:js": "eslint --ext .js,.ts,.cjs,.tsx --cache src test",
"test:unit": "yarn build",
"test:unit": "pnpm build",
"test:e2e": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
"test:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 yarn test:e2e --headed",
"test:e2e:full": "ALL_BROWSERS=1 yarn test:e2e",
"test:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 pnpm test:e2e --headed",
"test:e2e:full": "ALL_BROWSERS=1 pnpm test:e2e",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"preship": "yarn lint",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version; fi",
"preship": "pnpm lint",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version; fi",
"postship": "git push ${GHOST_UPSTREAM:-origin} --follow-tags && npm publish",
"prepublishOnly": "yarn build"
"prepublishOnly": "pnpm build"
},
"dependencies": {
"react": "18.3.1",

View file

@ -49,7 +49,7 @@ export default defineConfig({
/* Run local dev server before starting the tests */
webServer: {
command: `yarn dev:test`,
command: `pnpm dev:test`,
url: `http://localhost:${E2E_PORT}/signup-form.min.js`,
reuseExistingServer: !process.env.CI,
timeout: 10000

View file

@ -4,12 +4,12 @@
### Pre-requisites
- Run `yarn` in Ghost monorepo root
- Run `yarn` in this directory
- Run `pnpm` in Ghost monorepo root
- Run `pnpm` in this directory
### Running via Ghost `yarn dev` in root folder
### Running via Ghost `pnpm dev` in root folder
You can automatically start the Sodo-Search dev server when developing Ghost by running Ghost (in root folder) via `yarn dev --search`.
You can automatically start the Sodo-Search dev server when developing Ghost by running Ghost (in root folder) via `pnpm dev --search`.
# Copyright & License

View file

@ -23,19 +23,19 @@
"react-dom": "17.0.2"
},
"scripts": {
"dev": "concurrently \"vite preview -l silent\" \"yarn build:watch\" \"yarn tailwind\"",
"build": "vite build && yarn tailwind:base",
"dev": "concurrently \"vite preview -l silent\" \"pnpm build:watch\" \"pnpm tailwind\"",
"build": "vite build && pnpm tailwind:base",
"build:watch": "vite build --watch",
"tailwind": "yarn tailwind:base --watch ",
"tailwind": "pnpm tailwind:base --watch ",
"tailwind:base": "npx tailwindcss -i ./src/index.css -o ./umd/main.css --minify",
"test": "vitest run",
"test:ci": "yarn test --coverage",
"test:unit": "yarn test:ci",
"test:ci": "pnpm test --coverage",
"test:unit": "pnpm test:ci",
"lint": "eslint src --ext .js --cache",
"preship": "yarn lint",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version; fi",
"preship": "pnpm lint",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version; fi",
"postship": "git push ${GHOST_UPSTREAM:-origin} --follow-tags && npm publish",
"prepublishOnly": "yarn build"
"prepublishOnly": "pnpm build"
},
"eslintConfig": {
"env": {

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --lines 71 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -6,7 +6,7 @@ This is the home of the Ember.js-based Admin app that ships with [Ghost](https:/
### Running tests in the browser
Run all tests in the browser by running `yarn dev` in the Ghost monorepo and visiting http://localhost:4200/tests. The code is hotloaded on change and you can filter which tests to run.
Run all tests in the browser by running `pnpm dev` in the Ghost monorepo and visiting http://localhost:4200/tests. The code is hotloaded on change and you can filter which tests to run.
[Testing public documentation](https://ghost.notion.site/Testing-Ember-560cec6700fc4d37a58b3ba9febb4b4b)
@ -20,7 +20,7 @@ Tip: You can use `this.timeout(0); await this.pauseTest();` in your tests to tem
To build and run tests in the CLI, you can use:
```bash
TZ=UTC yarn test
TZ=UTC pnpm test
```
_Note the `TZ=UTC` environment variable which is currently required to get tests working if your system timezone doesn't match UTC._
@ -29,13 +29,13 @@ _Note the `TZ=UTC` environment variable which is currently required to get tests
However, this is very slow when writing tests, as it requires the app to be rebuilt on every change. Instead, create a separate watching build with:
```bash
yarn build --environment=test -w -o="dist-test"
pnpm build --environment=test -w -o="dist-test"
```
Then run tests with:
```bash
TZ=UTC yarn test 1 --reporter dot --path="dist-test"
TZ=UTC pnpm test 1 --reporter dot --path="dist-test"
```
The `--reporter dot` shows a dot (`.`) for every successful test, and `F` for every failed test. It renders the output of the failed tests only.
@ -44,7 +44,7 @@ The `--reporter dot` shows a dot (`.`) for every successful test, and `F` for ev
To run a specific test file:
```bash
TZ=UTC yarn test 1 --reporter dot --path="dist-test" -mp=tests/unit/helpers/gh-count-characters-test.js
TZ=UTC pnpm test 1 --reporter dot --path="dist-test" -mp=tests/unit/helpers/gh-count-characters-test.js
```
---

View file

@ -18,12 +18,12 @@
"scripts": {
"dev": "ember serve",
"build": "ember build --environment=production --silent",
"build:dev": "yarn build --environment=development",
"build:dev": "pnpm build --environment=development",
"test:unit": "true",
"test": "ember exam --split 2 --parallel",
"lint:js": "eslint . --cache",
"lint:hbs": "ember-template-lint .",
"lint": "yarn lint:js && yarn lint:hbs"
"lint": "pnpm lint:js && pnpm lint:hbs"
},
"engines": {
"node": "^18.12.1 || ^20.11.1"

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -139,12 +139,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -7,13 +7,13 @@
"main": "build/index.js",
"types": "build/index.d.ts",
"scripts": {
"build": "yarn build:ts",
"build": "pnpm build:ts",
"build:ts": "tsc",
"test:unit": "NODE_ENV=testing c8 --src src --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot -r ts-node/register './test/**/*.test.ts'",
"test": "yarn test:types && yarn test:unit",
"test": "pnpm test:types && pnpm test:unit",
"test:types": "tsc --noEmit",
"lint:code": "eslint src/ --ext .ts --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .ts --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -7,13 +7,13 @@
"main": "build/index.js",
"types": "build/index.d.ts",
"scripts": {
"build": "yarn build:ts",
"build": "pnpm build:ts",
"build:ts": "tsc",
"test:unit": "NODE_ENV=testing c8 --src src --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot -r ts-node/register './test/**/*.test.ts'",
"test": "yarn test:types && yarn test:unit",
"test": "pnpm test:types && pnpm test:unit",
"test:types": "tsc --noEmit",
"lint:code": "eslint src/ --ext .ts --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .ts --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -31,9 +31,9 @@ content/settings/**
!content/settings/README.md
content/themes/**
!content/themes/casper/**
content/themes/casper/yarn.lock
content/themes/casper/pnpm.lock
!content/themes/source/**
content/themes/source/yarn.lock
content/themes/source/pnpm.lock
node_modules/**
core/server/lib/members/static/auth/node_modules/**
**/*.db

View file

@ -165,7 +165,7 @@ function getWorkspaces(from) {
'README.md',
'LICENSE',
'PRIVACY.md',
'yarn.lock'
'pnpm.lock'
];
for (const file of filesToCopy) {

View file

@ -23,33 +23,33 @@
"archive": "npm pack",
"dev": "node --watch index.js",
"build:assets": "postcss core/frontend/public/ghost.css --no-map --use cssnano -o core/frontend/public/ghost.min.css",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"test:base": "mocha --reporter dot --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js",
"test:single": "yarn test:base --timeout=60000",
"test:all": "yarn test:unit && yarn test:integration && yarn test:e2e && yarn lint",
"test:debug": "DEBUG=ghost:test* yarn test",
"test:unit": "c8 yarn test:unit:base",
"test:unit:base": "yarn test:base './test/unit' --timeout=2000",
"test:integration": "yarn test:base './test/integration' --timeout=10000",
"test:e2e": "yarn test:base ./test/e2e-* --timeout=15000",
"test:regression": "yarn test:base './test/regression' --timeout=60000",
"test:single": "pnpm test:base --timeout=60000",
"test:all": "pnpm test:unit && pnpm test:integration && pnpm test:e2e && pnpm lint",
"test:debug": "DEBUG=ghost:test* pnpm test",
"test:unit": "c8 pnpm test:unit:base",
"test:unit:base": "pnpm test:base './test/unit' --timeout=2000",
"test:integration": "pnpm test:base './test/integration' --timeout=10000",
"test:e2e": "pnpm test:base ./test/e2e-* --timeout=15000",
"test:regression": "pnpm test:base './test/regression' --timeout=60000",
"test:browser": "NODE_ENV=testing-browser playwright test",
"test:browser:admin": "NODE_ENV=testing-browser playwright test test/e2e-browser --project=admin",
"test:browser:portal": "NODE_ENV=testing-browser playwright test test/e2e-browser --project=portal",
"test:browser:setup": "npx playwright install",
"test:ci:e2e": "c8 -c ./.c8rc.e2e.json -o coverage-e2e yarn test:e2e -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
"test:ci:regression": "yarn test:regression -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
"test:ci:integration": "c8 -c ./.c8rc.e2e.json -o coverage-integration --lines 57 --functions 47 --branches 77 --statements 57 yarn test:integration -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
"test:unit:slow": "yarn test:unit --reporter=mocha-slow-test-reporter",
"test:int:slow": "yarn test:integration --reporter=mocha-slow-test-reporter",
"test:e2e:slow": "yarn test:e2e --reporter=mocha-slow-test-reporter",
"test:ci:e2e": "c8 -c ./.c8rc.e2e.json -o coverage-e2e pnpm test:e2e -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
"test:ci:regression": "pnpm test:regression -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
"test:ci:integration": "c8 -c ./.c8rc.e2e.json -o coverage-integration --lines 57 --functions 47 --branches 77 --statements 57 pnpm test:integration -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
"test:unit:slow": "pnpm test:unit --reporter=mocha-slow-test-reporter",
"test:int:slow": "pnpm test:integration --reporter=mocha-slow-test-reporter",
"test:e2e:slow": "pnpm test:e2e --reporter=mocha-slow-test-reporter",
"test:reg:slow": "mocha --reporter dot --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/regression' --timeout=60000 --reporter=mocha-slow-test-reporter",
"lint:server": "eslint --ignore-path .eslintignore 'core/server/**/*.js' 'core/*.js' '*.js' --cache",
"lint:shared": "eslint --ignore-path .eslintignore 'core/shared/**/*.js' --cache",
"lint:frontend": "eslint --ignore-path .eslintignore 'core/frontend/**/*.js' --cache",
"lint:test": "eslint -c test/.eslintrc.js --ignore-path test/.eslintignore 'test/**/*.js' --cache",
"lint:code": "yarn lint:server && yarn lint:shared && yarn lint:frontend",
"lint": "yarn lint:server && yarn lint:shared && yarn lint:frontend && yarn lint:test",
"lint:code": "pnpm lint:server && pnpm lint:shared && pnpm lint:frontend",
"lint": "pnpm lint:server && pnpm lint:shared && pnpm lint:frontend && pnpm lint:test",
"prepack": "node monobundle.js"
},
"engines": {

View file

@ -1271,7 +1271,7 @@ describe('Members API', function () {
it('Correctly includes monthly forever percentage discounts in MRR', async function () {
// Do you get a offer_id is null failed test here
// -> check if members-api and members-offers package versions are in sync in yarn.lock or if both are linked in dev
// -> check if members-api and members-offers package versions are in sync in pnpm.lock or if both are linked in dev
const discount = {
id: 'di_1Knkn7HUEDadPGIBPOQgmzIX',
object: 'discount',

View file

@ -10,11 +10,11 @@ npx playwright install
#### Running tests
Run the browser test suite with `yarn test:browser`.
Run the browser test suite with `pnpm test:browser`.
#### Record test instructions
After installing PlayWright, start to record tests using `yarn test:browser:record`.
After installing PlayWright, start to record tests using `pnpm test:browser:record`.
Available flags:
* `--admin` - Runs a test starting in Ghost Admin

View file

@ -60,7 +60,7 @@ describe('staticTheme', function () {
});
it('should skip for .lock file', function (done) {
req.path = 'yarn.lock';
req.path = 'pnpm.lock';
staticTheme()(req, res, function next() {
activeThemeStub.called.should.be.false();

View file

@ -10,7 +10,7 @@ To update it:
1. Ensure your `content/themes/casper` folder is on the latest released version e.g.
- Run `yarn main`
- Run `pnpm main`
- `cd content/themes/casper`
- `git log -20` - find the latest tag
- `git checkout vx.y.z` - checkout the latest tag
@ -19,7 +19,7 @@ To update it:
- `cd tests/utils/fixtures/themes`
- `rm -rf casper`
- `rsync -rv --exclude '.git*' --exclude 'assets/css*' --exclude 'assets/js*' --exclude 'gulpfile.js' --exclude 'yarn.lock' --exclude 'README.md' --exclude 'node_modules' ../../../../content/themes/casper .`
- `rsync -rv --exclude '.git*' --exclude 'assets/css*' --exclude 'assets/js*' --exclude 'gulpfile.js' --exclude 'pnpm.lock' --exclude 'README.md' --exclude 'node_modules' ../../../../content/themes/casper .`
## Updating the Source theme fixture
The source fixture is a partial copy of the content/themes/source folder.
@ -29,7 +29,7 @@ To update it:
1. Ensure your `content/themes/source` folder is on the latest released version e.g.
- Run `yarn main`
- Run `pnpm main`
- `cd content/themes/source`
- `git log -20` - find the latest tag
- `git checkout vx.y.z` - checkout the latest tag
@ -38,7 +38,7 @@ To update it:
- `cd tests/utils/fixtures/themes`
- `rm -rf source`
- `rsync -rv --exclude '.git*' --exclude 'assets/css*' --exclude 'assets/js*' --exclude 'gulpfile.js' --exclude 'yarn.lock' --exclude 'README.md' --exclude 'node_modules' ../../../../content/themes/source .`
- `rsync -rv --exclude '.git*' --exclude 'assets/css*' --exclude 'assets/js*' --exclude 'gulpfile.js' --exclude 'pnpm.lock' --exclude 'README.md' --exclude 'node_modules' ../../../../content/themes/source .`
### Modifying theme fixtures
When a new rule is introduced in gscan one of these fixture files might break and you'll have to update a "zip" which isn't as easy as opening a text editor... It could become that one day but for now here are some commands to help out with the edit process

View file

@ -17,8 +17,8 @@
"test": "gscan .",
"test:ci": "gscan --fatal --verbose .",
"pretest": "gulp build",
"preship": "yarn test",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
"preship": "pnpm test",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
"postship": "git fetch && gulp release"
},
"author": {

View file

@ -13,8 +13,8 @@
"test": "gscan .",
"test:ci": "gscan --fatal --verbose .",
"pretest": "gulp build",
"preship": "yarn test",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
"preship": "pnpm test",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
"postship": "git fetch && gulp release"
},
"author": {

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura --check-coverage -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -9,9 +9,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura --check-coverage --100 -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,14 +8,14 @@
"types": "build/index.d.ts",
"scripts": {
"dev": "tsc --watch --preserveWatchOutput --sourceMap",
"build": "yarn build:ts",
"build": "pnpm build:ts",
"build:ts": "tsc",
"prepare": "tsc",
"test:unit": "NODE_ENV=testing c8 --src src --all --reporter text --reporter cobertura -- mocha --reporter dot -r ts-node/register './test/**/*.test.ts'",
"test": "yarn test:types && yarn test:unit",
"test": "pnpm test:types && pnpm test:unit",
"test:types": "tsc --noEmit",
"lint:code": "eslint src/ --ext .ts --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .ts --cache"
},
"files": [

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,14 +8,14 @@
"types": "build/index.d.ts",
"scripts": {
"dev": "tsc --watch --preserveWatchOutput --sourceMap",
"build": "yarn build:ts",
"build": "pnpm build:ts",
"build:ts": "tsc",
"prepare": "tsc",
"test:unit": "NODE_ENV=testing c8 --src src --all --reporter text --reporter cobertura -- mocha --reporter dot -r ts-node/register './test/**/*.test.ts'",
"test": "yarn test:types && yarn test:unit",
"test": "pnpm test:types && pnpm test:unit",
"test:types": "tsc --noEmit",
"lint:code": "eslint src/ --ext .ts --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .ts --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura --check-coverage --100 -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test:unit": "yarn test",
"test:unit": "pnpm test",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura --check-coverage -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,13 +8,13 @@
"types": "build/index.d.ts",
"scripts": {
"dev": "tsc --watch --preserveWatchOutput --sourceMap",
"build": "yarn build:ts",
"build": "pnpm build:ts",
"build:ts": "tsc",
"test:unit": "NODE_ENV=testing c8 --src src --all --reporter text --reporter cobertura mocha -r ts-node/register/transpile-only './**/*.test.ts'",
"test": "yarn test:types && yarn test:unit",
"test": "pnpm test:types && pnpm test:unit",
"test:types": "tsc --noEmit",
"lint:code": "eslint src/ --ext .ts --cache",
"lint": "yarn lint:code"
"lint": "pnpm lint:code"
},
"files": [
"build"

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -12,9 +12,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"devDependencies": {

View file

@ -8,10 +8,10 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -9,11 +9,11 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:base": "NODE_ENV=testing c8 --include index.js --include lib --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:base && yarn translate",
"test": "pnpm test:base && pnpm translate",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache",
"translate": "yarn translate:ghost && yarn translate:portal && yarn translate:signup-form && yarn translate:comments && yarn translate:search && node generate-context.js",
"translate": "pnpm translate:ghost && pnpm translate:portal && pnpm translate:signup-form && pnpm translate:comments && pnpm translate:search && node generate-context.js",
"translate:ghost": "NAMESPACE=ghost i18next '../core/core/{frontend,server,shared}/**/*.{js,jsx}'",
"translate:portal": "NAMESPACE=portal i18next '../../apps/portal/src/**/*.{js,jsx}'",
"translate:signup-form": "NAMESPACE=signup-form i18next '../../apps/signup-form/src/**/*.{ts,tsx}'",

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -12,11 +12,11 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter html --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -7,13 +7,13 @@
"main": "build/index.js",
"types": "build/index.d.ts",
"scripts": {
"build": "yarn build:ts",
"build": "pnpm build:ts",
"build:ts": "tsc",
"test:unit": "NODE_ENV=testing c8 --src src --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot -r ts-node/register './test/**/*.test.ts'",
"test": "yarn test:types && yarn test:unit",
"test": "pnpm test:types && pnpm test:unit",
"test:types": "tsc --noEmit",
"lint:code": "eslint src/ --ext .ts --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .ts --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,14 +10,14 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests
## Overview of how Ghost handles LinkRedirects
### Summary

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -12,12 +12,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -10,12 +10,12 @@ This is a monorepo package.
Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.
2. Run `pnpm` to install top-level dependencies.
## Test
- `yarn lint` run just eslint
- `yarn test` run lint and tests
- `pnpm lint` run just eslint
- `pnpm test` run lint and tests

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --lines 88 --check-coverage --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

View file

@ -8,9 +8,9 @@
"scripts": {
"dev": "echo \"Implement me!\"",
"test:unit": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
"test": "yarn test:unit",
"test": "pnpm test:unit",
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
},
"files": [

Some files were not shown because too many files have changed in this diff Show more