From 1be32fb1bdd35e31cd19a7bcd25fd76d950e26a0 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Tue, 21 Nov 2023 13:12:49 +0000 Subject: [PATCH] Rename to gql.tada --- .changeset/README.md | 8 ++++ .changeset/config.json | 16 ++++++++ .github/workflows/ci.yml | 27 +++++++------ .github/workflows/release.yml | 71 +++++++++++++++++++++++++++++++++++ README.md | 6 +-- package.json | 18 ++++----- scripts/changelog.js | 2 +- scripts/rollup.config.mjs | 4 +- 8 files changed, 126 insertions(+), 26 deletions(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json create mode 100644 .github/workflows/release.yml diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000..4f3b76b0 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..28d6c3c4 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@0.3.0/schema.json", + "changelog": "../scripts/changelog.js", + "commit": false, + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "minor", + "snapshot": { + "prereleaseTemplate": "{tag}-{commit}", + "useCalculatedVersion": true + }, + "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { + "onlyUpdatePeerDependentsWhenOutOfRange": true, + "updateInternalDependents": "out-of-range" + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abf53139..36d2522e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,42 +2,41 @@ name: CI on: pull_request: - branches: - - main + pull_request_review: + types: [submitted, edited] + branches: changeset-release/main jobs: - test: + check: name: Checks runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v2 with: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v1 with: node-version: 18 - name: Setup pnpm - uses: pnpm/action-setup@v2.2.4 + uses: pnpm/action-setup@v2.2.2 with: version: 8 run_install: false - name: Get pnpm store directory id: pnpm-store - run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT + run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" - name: Use pnpm store uses: actions/cache@v3 id: pnpm-cache with: - path: | - ~/.cache/Cypress - ${{ steps.pnpm-store.outputs.pnpm_cache_dir }} + path: ${{ steps.pnpm-store.outputs.pnpm_cache_dir }} key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm- @@ -48,5 +47,11 @@ jobs: - name: TypeScript run: pnpm run check + - name: Linting + run: pnpm run lint + - name: Unit Tests - run: pnpm run test + run: pnpm run test --run + + - name: Build + run: pnpm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..194c4ad4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,71 @@ +name: Release +on: + push: + branches: + - main +jobs: + release: + name: Release + runs-on: ubuntu-20.04 + timeout-minutes: 20 + permissions: + contents: write + id-token: write + issues: write + repository-projects: write + deployments: write + packages: write + pull-requests: write + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.2 + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + id: pnpm-store + run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - name: Use pnpm store + uses: actions/cache@v3 + id: pnpm-cache + with: + path: ${{ steps.pnpm-store.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + + - name: Install Dependencies + run: pnpm install --frozen-lockfile --prefer-offline + + - name: PR or Publish + id: changesets + uses: changesets/action@v1.4.5 + with: + version: pnpm changeset:version + publish: pnpm changeset:publish + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish Prerelease + if: steps.changesets.outputs.published != 'true' + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN" + git reset --hard origin/main + pnpm changeset version --no-git-tag --snapshot canary + pnpm changeset publish --no-git-tag --snapshot canary --tag canary diff --git a/README.md b/README.md index 12fd32cd..6170e730 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@
-

@0no-co/graphql.ts

+

gql.tada 🎉

The spec-compliant & magical GraphQL query language engine in the TypeScript type system

- - CI Status + + CI Status Discord diff --git a/package.json b/package.json index 4e6b8f56..8d1f4a3a 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "@0no-co/graphql.ts", + "name": "gql.tada", "description": "The spec-compliant & magical GraphQL query language engine in the TypeScript type system", "version": "0.0.0", "author": "0no.co ", "source": "./src/index.ts", - "main": "./dist/graphql.ts", - "module": "./dist/graphql.ts.mjs", - "types": "./dist/graphql.ts.d.ts", + "main": "./dist/gql-tada", + "module": "./dist/gql-tada.mjs", + "types": "./dist/gql-tada.d.ts", "sideEffects": false, "files": [ "LICENSE.md", @@ -15,9 +15,9 @@ ], "exports": { ".": { - "types": "./dist/graphql.ts.d.ts", - "import": "./dist/graphql.ts.mjs", - "require": "./dist/graphql.ts.js", + "types": "./dist/gql-tada.d.ts", + "import": "./dist/gql-tada.mjs", + "require": "./dist/gql-tada.js", "source": "./src/index.ts" }, "./package.json": "./package.json" @@ -42,9 +42,9 @@ "changeset:version": "changeset version && pnpm install --lockfile-only", "changeset:publish": "changeset publish" }, - "repository": "https://github.com/0no-co/graphql.ts", + "repository": "https://github.com/0no-co/gql.tada", "bugs": { - "url": "https://github.com/0no-co/graphql.ts/issues" + "url": "https://github.com/0no-co/gql.tada/issues" }, "license": "MIT", "prettier": { diff --git a/scripts/changelog.js b/scripts/changelog.js index c1d18c08..44d19d6c 100644 --- a/scripts/changelog.js +++ b/scripts/changelog.js @@ -3,7 +3,7 @@ const { getInfo } = require('@changesets/get-github-info'); config(); -const REPO = '0no-co/graphql.web'; +const REPO = '0no-co/gql.tada'; const SEE_LINE = /^See:\s*(.*)/i; const TRAILING_CHAR = /[.;:]$/g; const listFormatter = new Intl.ListFormat('en-US'); diff --git a/scripts/rollup.config.mjs b/scripts/rollup.config.mjs index 77cfa496..d6d636d8 100644 --- a/scripts/rollup.config.mjs +++ b/scripts/rollup.config.mjs @@ -114,7 +114,7 @@ const output = format => { const commonConfig = { input: { - 'graphql.web': './src/index.ts', + 'gql-tada': './src/index.ts', }, onwarn: () => {}, external: () => false, @@ -137,7 +137,7 @@ const jsConfig = { const dtsConfig = { ...commonConfig, input: { - 'graphql.web': './src/index.ts', + 'gql-tada': './src/index.ts', }, onwarn: () => {}, external: () => false,