Skip to content

Commit 2618ddf

Browse files
authored
cleanup, use pnpm and added changesets (#149)
1 parent 3711b12 commit 2618ddf

File tree

78 files changed

+2791
-24540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2791
-24540
lines changed

.changeset/config.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "dotansimha/graphql-typed-document-node" }
6+
],
7+
"commit": false,
8+
"fixed": [],
9+
"linked": [],
10+
"access": "public",
11+
"baseBranch": "master",
12+
"updateInternalDependencies": "patch",
13+
"ignore": [],
14+
"snapshot": {
15+
"useCalculatedVersion": true,
16+
"prereleaseTemplate": "{tag}-{datetime}-{commit}"
17+
}
18+
}

.changeset/pretty-rice-provide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@graphql-typed-document-node/core": patch
3+
---
4+
5+
- Cleanup repo structure, ship lightweight type-only package.
6+
- Use `import type` instead of `import` for `DocumentNode`.
7+
- Compile and test with latest TS and latest NodeJS LTS.

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,16 @@
1-
name: CI
2-
1+
name: ci
32
on:
4-
push:
3+
pull_request:
54
branches:
65
- master
7-
pull_request:
6+
push:
87
branches:
98
- master
109

1110
jobs:
12-
test:
13-
name: Testing on ${{matrix.os}} and Node ${{matrix.node_version}}
14-
runs-on: ${{matrix.os}}
15-
strategy:
16-
matrix:
17-
os: [ubuntu-latest]
18-
node_version: [14]
19-
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v2
22-
- name: Use Node ${{matrix.node_version}}
23-
uses: actions/setup-node@master
24-
with:
25-
node-version: ${{ matrix.node_version }}
26-
- name: Get yarn cache
27-
id: yarn-cache
28-
run: echo "::set-output name=dir::$(yarn cache dir)"
29-
- name: Cache Yarn
30-
uses: actions/cache@v2
31-
with:
32-
path: ${{ steps.yarn-cache.outputs.dir }}
33-
key: ${{ runner.os }}-${{matrix.node_version}}-yarn-${{ hashFiles('yarn.lock') }}
34-
restore-keys: |
35-
${{ runner.os }}-${{matrix.node_version}}-yarn-
36-
- name: Cache Jest
37-
uses: actions/cache@v2
38-
with:
39-
path: .cache/jest
40-
key: ${{ runner.os }}-${{matrix.node_version}}-jest-${{ hashFiles('yarn.lock') }}
41-
restore-keys: |
42-
${{ runner.os }}-${{matrix.node_version}}-jest-
43-
- name: Install Dependencies using Yarn
44-
run: yarn install
45-
- name: Lint
46-
run: yarn lint
47-
- name: Build
48-
run: yarn build
49-
- name: Test
50-
run: yarn test --logHeapUsage
51-
env:
52-
CI: true
11+
build:
12+
uses: the-guild-org/shared-config/.github/workflows/ci-node-matrix.yml@main
13+
with:
14+
script: pnpm build
15+
nodeVersions: '[14,16,18]'
16+
packageManager: pnpm

.github/workflows/pr.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: pr
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
7+
jobs:
8+
release:
9+
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
10+
with:
11+
npmTag: alpha
12+
buildScript: build
13+
nodeVersion: 18
14+
packageManager: pnpm
15+
secrets:
16+
githubToken: ${{ secrets.GITHUB_TOKEN }}
17+
npmToken: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 14 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,16 @@
1-
name: NPM Release
1+
name: release
22
on:
3-
release:
4-
types: [published]
3+
push:
4+
branches:
5+
- master
6+
57
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- name: Checkout Master
10-
uses: actions/checkout@v2
11-
- name: Configure Git Credentials
12-
run: |
13-
git config --global user.email "theguild-bot@users.noreply.github.com"
14-
git config --global user.name "theguild-bot"
15-
echo "machine github.com login theguild-bot password ${{secrets.GH_API_TOKEN}}" > ~/.netrc
16-
- name: Add origin remote and refetch master
17-
run: |
18-
git remote rm origin
19-
git remote add origin "https://github.com/${{github.repository}}"
20-
git fetch
21-
git checkout master
22-
git reset --hard
23-
- name: Use Node
24-
uses: actions/setup-node@v2
25-
with:
26-
node-version: '14.x'
27-
- name: Setup NPM credentials
28-
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
31-
- name: Get yarn cache
32-
id: yarn-cache
33-
run: echo "::set-output name=dir::$(yarn cache dir)"
34-
- name: Cache Yarn
35-
uses: actions/cache@v2
36-
with:
37-
path: ${{ steps.yarn-cache.outputs.dir }}
38-
key: ${{ runner.os }}-14-15-yarn-${{ hashFiles('yarn.lock') }}
39-
restore-keys: |
40-
${{ runner.os }}-14-15-yarn-
41-
- name: Install Dependencies using Yarn
42-
run: yarn install && git checkout yarn.lock
43-
- name: Build
44-
run: yarn build
45-
- name: Publish to NPM
46-
run: npm run release
47-
env:
48-
RELEASE_VERSION: ${{ github.event.release.tag_name }}
49-
- name: Commit updated package.json files
50-
run: |
51-
git add .
52-
git commit -m "${{ github.event.release.tag_name }}"
53-
- name: Push all the changes
54-
uses: ad-m/github-push-action@master
55-
with:
56-
github_token: ${{ secrets.GITHUB_TOKEN }}
8+
stable:
9+
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
10+
with:
11+
releaseScript: release
12+
nodeVersion: 18
13+
packageManager: pnpm
14+
secrets:
15+
githubToken: ${{ secrets.GITHUB_TOKEN }}
16+
npmToken: ${{ secrets.NPM_TOKEN }}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Dotan Simha
3+
Copyright (c) 2020-2023 Dotan Simha
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

0 commit comments

Comments
 (0)