From 47d1a3c451f7101aca1c13df164e8e76bd7e6b3e Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Mon, 2 Sep 2024 15:09:52 +0200 Subject: [PATCH] Switched `build` and `build:ts` scripts ref https://linear.app/tryghost/issue/DEV-20/faster-builds - `build` should be the overall script to build the package - `build:ts` should only build TypeScript - by having them switched around, `build:ts` would call `yarn build`, and `yarn` adds several hundreds of milliseconds of time to each build --- ghost/bookshelf-repository/package.json | 4 ++-- ghost/collections/package.json | 4 ++-- ghost/donations/package.json | 4 ++-- ghost/email-addresses/package.json | 4 ++-- ghost/ghost/package.json | 4 ++-- ghost/in-memory-repository/package.json | 4 ++-- ghost/mail-events/package.json | 4 ++-- ghost/model-to-domain-event-interceptor/package.json | 4 ++-- ghost/nql-filter-expansions/package.json | 4 ++-- ghost/post-events/package.json | 4 ++-- ghost/post-revisions/package.json | 4 ++-- ghost/recommendations/package.json | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ghost/bookshelf-repository/package.json b/ghost/bookshelf-repository/package.json index ca38ff7109..33db7ccf47 100644 --- a/ghost/bookshelf-repository/package.json +++ b/ghost/bookshelf-repository/package.json @@ -7,8 +7,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "scripts": { - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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:types": "tsc --noEmit", diff --git a/ghost/collections/package.json b/ghost/collections/package.json index 44937f4f37..f26123e4ea 100644 --- a/ghost/collections/package.json +++ b/ghost/collections/package.json @@ -7,8 +7,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "scripts": { - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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:types": "tsc --noEmit", diff --git a/ghost/donations/package.json b/ghost/donations/package.json index 448fc15eb6..df3eb7d681 100644 --- a/ghost/donations/package.json +++ b/ghost/donations/package.json @@ -8,8 +8,8 @@ "types": "build/index.d.ts", "scripts": { "dev": "tsc --watch --preserveWatchOutput --sourceMap", - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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", diff --git a/ghost/email-addresses/package.json b/ghost/email-addresses/package.json index bf44203ac9..6fe53b2c76 100644 --- a/ghost/email-addresses/package.json +++ b/ghost/email-addresses/package.json @@ -8,8 +8,8 @@ "types": "build/index.d.ts", "scripts": { "dev": "tsc --watch --preserveWatchOutput --sourceMap", - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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", diff --git a/ghost/ghost/package.json b/ghost/ghost/package.json index cc07181be9..dc295d275c 100644 --- a/ghost/ghost/package.json +++ b/ghost/ghost/package.json @@ -8,8 +8,8 @@ "types": "build/index.d.ts", "scripts": { "dev": "tsc --watch --preserveWatchOutput --sourceMap", - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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:types": "tsc --noEmit", diff --git a/ghost/in-memory-repository/package.json b/ghost/in-memory-repository/package.json index 42764f8897..d7a3e0efb9 100644 --- a/ghost/in-memory-repository/package.json +++ b/ghost/in-memory-repository/package.json @@ -7,8 +7,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "scripts": { - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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:types": "tsc --noEmit", diff --git a/ghost/mail-events/package.json b/ghost/mail-events/package.json index 7a9978a298..7162718ecd 100644 --- a/ghost/mail-events/package.json +++ b/ghost/mail-events/package.json @@ -7,8 +7,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "scripts": { - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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:types": "tsc --noEmit", diff --git a/ghost/model-to-domain-event-interceptor/package.json b/ghost/model-to-domain-event-interceptor/package.json index 961fc9632d..70383339d9 100644 --- a/ghost/model-to-domain-event-interceptor/package.json +++ b/ghost/model-to-domain-event-interceptor/package.json @@ -7,8 +7,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "scripts": { - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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:types": "tsc --noEmit", diff --git a/ghost/nql-filter-expansions/package.json b/ghost/nql-filter-expansions/package.json index 1a1f3cfeed..f835e9f73f 100644 --- a/ghost/nql-filter-expansions/package.json +++ b/ghost/nql-filter-expansions/package.json @@ -7,8 +7,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "scripts": { - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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:types": "tsc --noEmit", diff --git a/ghost/post-events/package.json b/ghost/post-events/package.json index f1c53e8e82..10bf5fbe3c 100644 --- a/ghost/post-events/package.json +++ b/ghost/post-events/package.json @@ -8,8 +8,8 @@ "types": "build/index.d.ts", "scripts": { "dev": "tsc --watch --preserveWatchOutput --sourceMap", - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn 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:types": "tsc --noEmit", diff --git a/ghost/post-revisions/package.json b/ghost/post-revisions/package.json index f605eec553..47d3d0da43 100644 --- a/ghost/post-revisions/package.json +++ b/ghost/post-revisions/package.json @@ -7,8 +7,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "scripts": { - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn build:ts", + "build:ts": "tsc", "test:types": "tsc --noEmit", "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:unit && yarn test:types", diff --git a/ghost/recommendations/package.json b/ghost/recommendations/package.json index b380c88926..d7d62c29f5 100644 --- a/ghost/recommendations/package.json +++ b/ghost/recommendations/package.json @@ -8,8 +8,8 @@ "types": "build/index.d.ts", "scripts": { "dev": "tsc --watch --preserveWatchOutput --sourceMap", - "build": "tsc", - "build:ts": "yarn build", + "build": "yarn build:ts", + "build:ts": "tsc", "prepare": "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",