Skip to content

Commit

Permalink
cleaning up build commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ojkelly committed Feb 17, 2024
1 parent e7cecf9 commit 7757d06
Show file tree
Hide file tree
Showing 242 changed files with 412 additions and 5,328 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/pullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ jobs:
run: |
yarn build
- name: Test
run: |
yarn test --ignore-cache
# Tests are currently broken due to jest/ts/esm issues
# - name: Test
# run: |
# yarn test --ignore-cache

- uses: actions/upload-artifact@v4
with:
name: plugins-all
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:
run: |
yarn install --immutable-cache --check-cache && \
yarn build && \
yarn test && \
yarn build -c update:local
yarn build -c build:update
- name: Create Release
id: create_release
Expand Down
3,041 changes: 255 additions & 2,786 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/abab-npm-2.0.6-2662fba7f0-0b245c3c3e.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/atob-npm-2.1.2-bcb583261e-ada635b519.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ms-npm-2.0.0-9e1101a471-f8fda810b3.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/psl-npm-1.9.0-a546edad1a-6a3f805fda.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ret-npm-0.1.15-0d3c19de76-01f77cad0f.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/sane-npm-4.1.0-8ab7d6a963-7d0991ecaa.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/urix-npm-0.1.0-bd5e55a13a-264f1b2936.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"eslint-plugin-react": "^7.33.2",
"execa": "^8.0.1",
"fs-extra": "^11.2.0",
"jest": "^29.6.3",
"jest-pnp-resolver": "^1.2.3",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
Expand All @@ -58,6 +57,8 @@
"typescript": "^5.3.3"
},
"resolutions": {
"jest": "29.1.2",
"ts-jest": "29.1.2",
"esbuild": "0.20.0",
"typescript": "^5",
"@yarnpkg/builder": "^4",
Expand Down
5 changes: 0 additions & 5 deletions packages/plugins/plugin-all/jest.config.js

This file was deleted.

14 changes: 3 additions & 11 deletions packages/plugins/plugin-all/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,9 @@
"strip-ansi": "^7.1.0"
},
"scripts": {
"b": "do build-plugin",
"dev": "yarn update:local",
"build": "do build-plugin",
"clean": "do clean-plugin",
"build:update": "do update-plugin",
"build:plugin-local": "builder build plugin --no-minify && yarn run update:patch",
"build:plugin-stage": "builder build plugin --no-minify",
"update:workspace": "shx mkdir -p ../../../.yarn/plugins/@ojkelly && shx cp ./bundles/@yarnpkg/plugin-all.js ../../../.yarn/plugins/@ojkelly/plugin-all.cjs",
"update:patch": "yarn update:patch-name && yarn update:patch-node",
"update:patch-name": "replace '@yarnpkg/plugin-all' '@ojkelly/plugin-all' ./bundles/@yarnpkg/plugin-all.js",
"update:patch-node": "replace 'node:' '' ./bundles/@yarnpkg/plugin-all.js",
"update": "yarn build:plugin-stage && yarn update:patch-name && yarn update:workspace",
"update:local": "yarn build:plugin-stage && yarn update:patch && yarn update:patch-node && yarn update:workspace",
"test": "jest --passWithNoTests"
},
"repository": {
Expand All @@ -79,7 +69,9 @@
"node": ">=12 <14 || 14.2 - 14.9 || >14.10.0"
},
"jest": {
"preset": "ts-jest"
"preset": "ts-jest",
"testEnvironment": "node",
"resolver": "jest-pnp-resolver"
},
"yarn.build": {
"output": "bundles"
Expand Down
5 changes: 0 additions & 5 deletions packages/plugins/plugin-build/jest.config.js

This file was deleted.

16 changes: 6 additions & 10 deletions packages/plugins/plugin-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,9 @@
"strip-ansi": "^7.1.0"
},
"scripts": {
"dev": "yarn update:local",
"build": "yarn build:plugin-stage",
"build:plugin-stage": "builder build plugin",
"update:workspace": "shx mkdir -p ../../../.yarn/plugins/@ojkelly && shx cp ./bundles/@yarnpkg/plugin-build.js ../../../.yarn/plugins/@ojkelly/plugin-build.cjs",
"update:patch-name": "replace '@yarnpkg/plugin-build' '@ojkelly/plugin-build' ./bundles/@yarnpkg/plugin-build.js",
"update:patch-node": "replace 'node:' '' ./bundles/@yarnpkg/plugin-build.js",
"update": "yarn build:plugin-stage && yarn update:patch-name && yarn update:workspace",
"update:local": "yarn build:plugin-stage && yarn update:patch-name && yarn update:workspace",
"clean": "shx rm -fr build bundles",
"build": "do build-plugin",
"clean": "do clean-plugin",
"build:update": "do update-plugin",
"test": "jest --passWithNoTests"
},
"repository": {
Expand All @@ -83,7 +77,9 @@
"node": ">=12 <14 || 14.2 - 14.9 || >14.10.0"
},
"jest": {
"preset": "ts-jest"
"preset": "ts-jest",
"testEnvironment": "node",
"resolver": "jest-pnp-resolver"
},
"yarn.build": {
"output": "bundles"
Expand Down
5 changes: 0 additions & 5 deletions packages/plugins/plugin-bundle/jest.config.js

This file was deleted.

15 changes: 6 additions & 9 deletions packages/plugins/plugin-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,9 @@
"strip-ansi": "^7.1.0"
},
"scripts": {
"dev": "yarn update:local",
"build": "yarn build:plugin-stage",
"build:plugin-stage": "builder build plugin",
"update:workspace": "shx mkdir -p ../../../.yarn/plugins/@ojkelly && shx cp ./bundles/@yarnpkg/plugin-bundle.js ../../../.yarn/plugins/@ojkelly/plugin-bundle.cjs",
"update:patch-name": "replace '@yarnpkg/plugin-bundle' '@ojkelly/plugin-bundle' ./bundles/@yarnpkg/plugin-bundle.js",
"update": "yarn build:plugin-stage && yarn update:patch-name && yarn update:workspace",
"update:local": "yarn build:plugin-stage && yarn update:patch-name && yarn update:workspace",
"clean": "shx rm -fr build bundles",
"build": "do build-plugin",
"clean": "do clean-plugin",
"build:update": "do update-plugin",
"test": "jest --passWithNoTests"
},
"repository": {
Expand All @@ -78,7 +73,9 @@
"node": ">=12 <14 || 14.2 - 14.9 || >14.10.0"
},
"jest": {
"preset": "ts-jest"
"preset": "ts-jest",
"testEnvironment": "node",
"resolver": "jest-pnp-resolver"
},
"yarn.build": {
"output": "bundles"
Expand Down
5 changes: 0 additions & 5 deletions packages/plugins/plugin-package-yaml/jest.config.js

This file was deleted.

16 changes: 7 additions & 9 deletions packages/plugins/plugin-package-yaml/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@ojkelly/plugin-package-yaml",
"name": "@ojkelly/yarn-plugin-package-yaml",
"version": "0.9.1",
"homepage": "https://yarn.build",
"license": "MIT",
Expand Down Expand Up @@ -47,13 +47,9 @@
"yawn-yaml": "^1.5.0"
},
"scripts": {
"build": "yarn build:plugin-stage",
"build:plugin-stage": "builder build plugin",
"update:workspace": "shx mkdir -p ../../../.yarn/plugins/@ojkelly && shx cp ./bundles/@yarnpkg/plugin-package-yaml.js ../../../.yarn/plugins/@ojkelly/plugin-package-yaml.cjs",
"update:patch-name": "replace '@yarnpkg/plugin-package-yaml' '@ojkelly/plugin-package-yaml' ./bundles/@yarnpkg/plugin-package-yaml.js",
"update": "yarn build:plugin-stage && yarn update:patch-name && yarn update:workspace",
"update:local": "yarn build:plugin-stage && yarn update:workspace",
"clean": "shx rm -fr build bundles",
"build": "do build-plugin",
"clean": "do clean-plugin",
"build:update": "do update-plugin",
"test": "jest --passWithNoTests"
},
"repository": {
Expand All @@ -70,6 +66,8 @@
"node": ">=12 <14 || 14.2 - 14.9 || >14.10.0"
},
"jest": {
"preset": "ts-jest"
"preset": "ts-jest",
"testEnvironment": "node",
"resolver": "jest-pnp-resolver"
}
}
5 changes: 0 additions & 5 deletions packages/plugins/plugin-test/jest.config.js

This file was deleted.

28 changes: 18 additions & 10 deletions packages/plugins/plugin-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,11 @@
"strip-ansi": "^7.1.0"
},
"scripts": {
"build": "yarn build:plugin-stage",
"dev": "yarn update:local",
"build:plugin-stage": "builder build plugin",
"update:workspace": "shx mkdir -p ../../../.yarn/plugins/@ojkelly && shx cp ./bundles/@yarnpkg/plugin-test.js ../../../.yarn/plugins/@ojkelly/plugin-test.cjs",
"update:patch-name": "replace '@yarnpkg/plugin-test' '@ojkelly/plugin-test' ./bundles/@yarnpkg/plugin-test.js",
"update": "yarn build:plugin-stage && yarn update:patch-name && yarn update:workspace",
"update:local": "yarn build:plugin-stage && yarn update:patch-name && yarn update:workspace",
"clean": "shx rm -fr build bundles",
"test": "jest --passWithNoTests"
"build": "do build-plugin",
"clean": "do clean-plugin",
"build:update": "do update-plugin",
"test": "jest --passWithNoTests",
"t": "yarn node --experimental-vm-modules $(yarn bin jest)"
},
"repository": {
"type": "git",
Expand All @@ -72,7 +68,19 @@
"node": ">=12 <14 || 14.2 - 14.9 || >14.10.0"
},
"jest": {
"preset": "ts-jest"
"testEnvironment": "node",
"resolver": "jest-pnp-resolver",
"extensionsToTreatAsEsm": [
".ts"
],
"transform": {
"^.+\\.m?[tj]sx?$": [
"ts-jest",
{
"useESM": true
}
]
}
},
"yarn.build": {
"output": "bundles"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const supervisor = require("@ojkelly/yarn-build-shared/src/supervisor");
import {formatTimestampDifference} from "@ojkelly/yarn-build-shared/src/supervisor";

test(`ensure formatTimestampDifference copes with a variety of time ranges`, () => {
const from = 0;
Expand All @@ -9,18 +9,18 @@ test(`ensure formatTimestampDifference copes with a variety of time ranges`, ()
const checkTenMinutes = 10 * 60 * 1000;

expect(
supervisor.formatTimestampDifference(from, checkFiveHundredMilliseconds)
formatTimestampDifference(from, checkFiveHundredMilliseconds)
).toBe(`0.50s`);
expect(supervisor.formatTimestampDifference(from, checkOneSecond)).toBe(
expect(formatTimestampDifference(from, checkOneSecond)).toBe(
`1.00s`
);
expect(
supervisor.formatTimestampDifference(from, checkSixPointThreeSeconds)
formatTimestampDifference(from, checkSixPointThreeSeconds)
).toBe(`6.30s`);
expect(
supervisor.formatTimestampDifference(from, checkTwoMinutesSevenSeconds)
formatTimestampDifference(from, checkTwoMinutesSevenSeconds)
).toBe(`2m 7.00s`);
expect(supervisor.formatTimestampDifference(from, checkTenMinutes)).toBe(
expect(formatTimestampDifference(from, checkTenMinutes)).toBe(
`10m`
);
});
10 changes: 0 additions & 10 deletions packages/plugins/shared/jest.config.ts

This file was deleted.

5 changes: 5 additions & 0 deletions packages/plugins/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,10 @@
"p-queue": "^8.0.1",
"slice-ansi": "^7.1.0",
"strip-ansi": "^7.1.0"
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "node",
"resolver": "jest-pnp-resolver"
}
}
17 changes: 7 additions & 10 deletions packages/tools/do/scripts/clean-plugin.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
#!/usr/bin/env node
/* eslint-disable no-console */

"use strict";

const env = require("./util/env");
const fs = require("fs-extra");

// Clean -----------------------------------------------------------------------
//
// const {bundlePath} = require("./build-plugin");

const bundlePath = `${env.repo.root}${env.pkg.path}/bundles`;

// if (bundlePath.startsWith(env.repo.root)) {
console.log(`Cleaning up ${bundlePath}`);
try {
fs.removeSync(bundlePath);
} catch (err) {
console.error(err);
}
// }
console.log(`Cleaning up ${bundlePath}`);
try {
fs.removeSync(bundlePath);
} catch (err) {
console.error(err);
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"baseUrl": ".",
"strict": true,
"target": "ES6",
"moduleResolution": "node",
"module": "CommonJS",
"moduleResolution": "Node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"outDir": "build",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// "module": "NodeNext",
// "moduleResolution": "NodeNext",
"declaration": true,
"allowJs": true,
"downlevelIteration": true,
"importHelpers": true,
"skipLibCheck": true,
Expand Down
Loading

0 comments on commit 7757d06

Please sign in to comment.