Skip to content

Commit

Permalink
version up yarn & add deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
woohm402 committed Aug 14, 2024
1 parent 70789eb commit ae03cb2
Show file tree
Hide file tree
Showing 6 changed files with 1,007 additions and 898 deletions.
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.1.cjs

This file was deleted.

925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
yarnPath: .yarn/releases/yarn-4.3.1.cjs
yarnPath: .yarn/releases/yarn-4.4.0.cjs

defaultSemverRangePrefix: ''
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
"scripts": {
"test": "turbo run test",
"build": "turbo run build",
"prettier": "prettier . --check"
"prettier": "prettier . --check",
"deploy": "tsx ./scripts/deploy.ts"
},
"devDependencies": {
"@types/node": "22.3.0",
"prettier": "3.3.3",
"tsx": "4.17.0",
"turbo": "2.0.9",
"typescript": "5.5.3"
},
"workspaces": [
"packages/*"
],
"packageManager": "yarn@4.3.1"
"packageManager": "yarn@4.4.0"
}
23 changes: 23 additions & 0 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { exec } from 'child_process';

const target = process.argv[2];

if (target !== 'react' && target !== 'base') throw new Error('Invalid target');

const execa = (command: string) =>
new Promise((resolve, reject) =>
exec(command, (err, stdout, stderr) =>
err ? reject(stderr) : resolve(stdout),
),
);

const deploy = async (target: 'base' | 'react') => {
console.log('Deploying', target);
const packageJson = await import(`../packages/${target}/package.json`);
const tagName = `react-v${packageJson.version}`;
await execa(`git tag ${tagName}`);
await execa(`git push origin ${tagName}`);
console.log('Tag pushed', tagName);
};

deploy(target);
52 changes: 51 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:22.3.0":
version: 22.3.0
resolution: "@types/node@npm:22.3.0"
dependencies:
undici-types: "npm:~6.18.2"
checksum: 10c0/855be3b97f4262a84818f889ff898e147dcef4f72b866e3551a8367380cdb63a45cf3929f09d9a0647f62706f8d4772e91a1ecd1bd7c6a80d6744c2b0cbca608
languageName: node
linkType: hard

"@types/prop-types@npm:*":
version: 15.7.12
resolution: "@types/prop-types@npm:15.7.12"
Expand Down Expand Up @@ -1066,7 +1075,9 @@ __metadata:
version: 0.0.0-use.local
resolution: "@woohm402/eslint-config@workspace:."
dependencies:
"@types/node": "npm:22.3.0"
prettier: "npm:3.3.3"
tsx: "npm:4.17.0"
turbo: "npm:2.0.9"
typescript: "npm:5.5.3"
languageName: unknown
Expand Down Expand Up @@ -1914,7 +1925,7 @@ __metadata:
languageName: node
linkType: hard

"esbuild@npm:^0.23.0":
"esbuild@npm:^0.23.0, esbuild@npm:~0.23.0":
version: 0.23.0
resolution: "esbuild@npm:0.23.0"
dependencies:
Expand Down Expand Up @@ -2464,6 +2475,15 @@ __metadata:
languageName: node
linkType: hard

"get-tsconfig@npm:^4.7.5":
version: 4.7.6
resolution: "get-tsconfig@npm:4.7.6"
dependencies:
resolve-pkg-maps: "npm:^1.0.0"
checksum: 10c0/2240e1b13e996dfbb947d177f422f83d09d1f93c9ce16959ebb3c2bdf8bdf4f04f98eba043859172da1685f9c7071091f0acfa964ebbe4780394d83b7dc3f58a
languageName: node
linkType: hard

"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2":
version: 5.1.2
resolution: "glob-parent@npm:5.1.2"
Expand Down Expand Up @@ -3906,6 +3926,13 @@ __metadata:
languageName: node
linkType: hard

"resolve-pkg-maps@npm:^1.0.0":
version: 1.0.0
resolution: "resolve-pkg-maps@npm:1.0.0"
checksum: 10c0/fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab
languageName: node
linkType: hard

"resolve@npm:^2.0.0-next.5":
version: 2.0.0-next.5
resolution: "resolve@npm:2.0.0-next.5"
Expand Down Expand Up @@ -4614,6 +4641,22 @@ __metadata:
languageName: node
linkType: hard

"tsx@npm:4.17.0":
version: 4.17.0
resolution: "tsx@npm:4.17.0"
dependencies:
esbuild: "npm:~0.23.0"
fsevents: "npm:~2.3.3"
get-tsconfig: "npm:^4.7.5"
dependenciesMeta:
fsevents:
optional: true
bin:
tsx: dist/cli.mjs
checksum: 10c0/ad720b81d6447c7695d24c27947fa1a2b6db9d2ef03216389edd6fa0006aa479bc0d8348a1ac9975a08edef4ce791ff5629a24d8dccbb0987f42e5407785cfa4
languageName: node
linkType: hard

"turbo-darwin-64@npm:2.0.9":
version: 2.0.9
resolution: "turbo-darwin-64@npm:2.0.9"
Expand Down Expand Up @@ -4815,6 +4858,13 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.18.2":
version: 6.18.2
resolution: "undici-types@npm:6.18.2"
checksum: 10c0/dea28163891a5af7624c120107dc07a74c369ee94c6dd1d0de29af061ee129fac4846f97130589f4436b85f6102c73d30328ca908be02626dd8ab9fec5642aba
languageName: node
linkType: hard

"unique-filename@npm:^3.0.0":
version: 3.0.0
resolution: "unique-filename@npm:3.0.0"
Expand Down

0 comments on commit ae03cb2

Please sign in to comment.