From 11fc22d92ada115e46d1ef5e9e3d03cb72250958 Mon Sep 17 00:00:00 2001 From: Putro <29204244+Pewtro@users.noreply.github.com> Date: Wed, 27 Mar 2024 20:24:48 +0100 Subject: [PATCH] [Project] Add turbo to help with management of dependencies --- .changeset/lazy-jars-sort.md | 5 ++ .github/workflows/release.yml | 3 + .gitignore | 2 + package.json | 1 + packages/client/package.json | 2 +- .../core/src/{endpoints.ts => endpoint.ts} | 0 packages/core/src/index.ts | 7 +- packages/core/src/resource.ts | 8 +++ pnpm-lock.yaml | 72 ++++++++++++++++++- turbo.json | 11 +++ 10 files changed, 107 insertions(+), 4 deletions(-) create mode 100644 .changeset/lazy-jars-sort.md rename packages/core/src/{endpoints.ts => endpoint.ts} (100%) create mode 100644 packages/core/src/resource.ts create mode 100644 turbo.json diff --git a/.changeset/lazy-jars-sort.md b/.changeset/lazy-jars-sort.md new file mode 100644 index 0000000..3b95045 --- /dev/null +++ b/.changeset/lazy-jars-sort.md @@ -0,0 +1,5 @@ +--- +'@blizzard/core': patch +--- + +Initial release of @blizzard/core so the other libraries can depend on it. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6aa1ce..fc63b80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,9 @@ jobs: - name: Install Dependencies run: pnpm install + - name: Turbo + run: pnpm turbo lint:ci + - name: Lint, Prettier, and Typecheck run: pnpm lint:ci diff --git a/.gitignore b/.gitignore index 752153c..45fc505 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ node_modules /.pnp .pnp.js +# turbo +.turbo # eslint .eslintcache diff --git a/package.json b/package.json index 34f2d44..a9b5416 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "npm-run-all2": "6.1.2", "prettier": "3.2.5", "tsup": "8.0.2", + "turbo": "1.13.0", "typescript": "5.4.3", "vitest": "1.4.0", "zod": "3.22.4" diff --git a/packages/client/package.json b/packages/client/package.json index 563e2f8..6ff4314 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -44,7 +44,7 @@ "overwatch" ], "dependencies": { - "@blizzard/core": "workspace:*", + "@blizzard/core": "^0.0.0", "axios": "1.6.8" }, "scripts": { diff --git a/packages/core/src/endpoints.ts b/packages/core/src/endpoint.ts similarity index 100% rename from packages/core/src/endpoints.ts rename to packages/core/src/endpoint.ts diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 81ba1be..e39ee1f 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,2 +1,5 @@ -export type { Origins, Locales } from './endpoints.js'; -export { getEndpoint } from './endpoints.js'; +//Resource +export type { BlizzardNamespaces } from './resource.js'; +//Endpoint +export type { Origins, Locales } from './endpoint.js'; +export { getEndpoint } from './endpoint.js'; diff --git a/packages/core/src/resource.ts b/packages/core/src/resource.ts new file mode 100644 index 0000000..bfed2e8 --- /dev/null +++ b/packages/core/src/resource.ts @@ -0,0 +1,8 @@ +export type BlizzardNamespaces = + | 'profile' + | 'static' + | 'dynamic' + | 'static-classic' + | 'dynamic-classic' + | 'static-classic1x' + | 'dynamic-classic1x'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ff1b81..2111e18 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,6 +46,9 @@ importers: tsup: specifier: 8.0.2 version: 8.0.2(typescript@5.4.3) + turbo: + specifier: 1.13.0 + version: 1.13.0 typescript: specifier: 5.4.3 version: 5.4.3 @@ -59,7 +62,7 @@ importers: packages/client: dependencies: '@blizzard/core': - specifier: workspace:* + specifier: ^0.0.0 version: link:../core axios: specifier: 1.6.8 @@ -5964,6 +5967,73 @@ packages: yargs: 17.7.2 dev: true + /turbo-darwin-64@1.13.0: + resolution: + { integrity: sha512-ctHeJXtQgBcgxnCXwrJTGiq57HtwF7zWz5NTuSv//5yeU01BtQIt62ArKfjudOhRefWJbX3Z5srn88XTb9hfww== } + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /turbo-darwin-arm64@1.13.0: + resolution: + { integrity: sha512-/Q9/pNFkF9w83tNxwMpgapwLYdQ12p8mpty2YQRoUiS9ClWkcqe136jR0mtuMqzlNlpREOFZaoyIthjt6Sdo0g== } + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /turbo-linux-64@1.13.0: + resolution: + { integrity: sha512-hgbT7o020BGV4L7Sd8hhFTd5zVKPKxbsr0dPfel/9NkdTmptz2aGZ0Vb2MAa18SY3XaCQpDxmdYuOzvvRpo5ZA== } + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /turbo-linux-arm64@1.13.0: + resolution: + { integrity: sha512-WK01i2wDZARrV+HEs495A3hNeGMwQR5suYk7G+ceqqW7b+dOTlQdvUjnI3sg7wAnZPgjafFs/hoBaZdJjVa/nw== } + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /turbo-windows-64@1.13.0: + resolution: + { integrity: sha512-hJgSZJZwlWHNwLEthaqJqJWGm4NqF5X/I7vE0sPE4i/jeDl8f0n1hcOkgJkJiNXVxhj+qy/9+4dzbPLKT9imaQ== } + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /turbo-windows-arm64@1.13.0: + resolution: + { integrity: sha512-L/ErxYoXeq8tmjU/AIGicC9VyBN1zdYw8JlM4yPmMI0pJdY8E4GaYK1IiIazqq7M72lmQhU/WW7fV9FqEktwrw== } + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /turbo@1.13.0: + resolution: + { integrity: sha512-r02GtNmkOPcQvUzVE6lg474QVLyU02r3yh3lUGqrFHf5h5ZEjgDGWILsAUqplVqjri1Y/oOkTssks4CObTAaiw== } + hasBin: true + optionalDependencies: + turbo-darwin-64: 1.13.0 + turbo-darwin-arm64: 1.13.0 + turbo-linux-64: 1.13.0 + turbo-linux-arm64: 1.13.0 + turbo-windows-64: 1.13.0 + turbo-windows-arm64: 1.13.0 + dev: true + /type-check@0.4.0: resolution: { integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== } diff --git a/turbo.json b/turbo.json new file mode 100644 index 0000000..303a831 --- /dev/null +++ b/turbo.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://turbo.build/schema.json", + "pipeline": { + "build": { + "dependsOn": ["^build"] + }, + "lint:ci": { + "dependsOn": ["build"] + } + } +}