Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Cache yarn packages
Expand All @@ -41,13 +41,10 @@ jobs:
- name: Use GraphQL v${{matrix.graphql-version}}
run: node ./scripts/match-graphql.js ${{matrix.graphql-version}}

- name: Install from network when no cache hit
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --prefer-offline

- name: Install from cache on cache-hit
if: steps.yarn-cache.outputs.cache-hit == 'true'
run: yarn install --offline
- name: Install dependencies
run: |
yarn config set enableImmutableInstalls false
yarn install

- name: Format and Lint check
run: yarn check-tsc && yarn lint && yarn build && yarn check-exports
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- main
tags-ignore:
- 'v*'
- "v*"
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -15,7 +15,7 @@ jobs:
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: yarn install --immutable
- run: node scripts/set-canary-version.js
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: yarn install --immutable
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ node_modules
/coverage
*.log
.stryker-tmp/
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
942 changes: 942 additions & 0 deletions .yarn/releases/yarn-4.9.2.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.9.2.cjs
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,5 @@
]
}
},
"resolutions": {
"jest/jest-cli/yargs/**/wrap-ansi": "7.0.0"
}
"packageManager": "[email protected]"
}
12 changes: 6 additions & 6 deletions scripts/match-graphql.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { writeFileSync } = require('fs');
const { resolve } = require('path');
const { argv, cwd } = require('process');
const { writeFileSync } = require("fs");
const { resolve } = require("path");
const { argv, cwd } = require("process");

const pkgPath = resolve(cwd(), './package.json');
const pkgPath = resolve(cwd(), "./package.json");

const pkg = require(pkgPath);

Expand All @@ -14,7 +14,7 @@ if (pkg.devDependencies.graphql.startsWith(version)) {
}

// If it is not stable version, use pinned version
const npmVersion = version.includes('-') ? version : `^${version}`;
const npmVersion = version.includes("-") ? version : `^${version}`;
pkg.devDependencies.graphql = npmVersion;

writeFileSync(pkgPath, JSON.stringify(pkg, null, 2), 'utf8');
writeFileSync(pkgPath, JSON.stringify(pkg, null, 2), "utf8");
Loading
Loading