Skip to content

Commit

Permalink
Next major release (dotansimha#695)
Browse files Browse the repository at this point in the history
* chore: remove old infra
* setup yarn 3
* style: run prettier
* update readme
* build: setup bob-the-bundler
* Setup initial core package and agnostic handler packages (dotansimha#693)
* added alpha releases and ci
* use node 16
* fixes for workspaces structure
* build: update deps
* temporarily allow no tests in CI to pass
* update contribs
* init changeset
* feat: add cors option (dotansimha#699)
* build: add fastify-cors
* fix: logging level
* temp fix for cors
* use cors option from user
* feat: file uploads (dotansimha#696)
* replace helix with ardas fork
* feat: allow config option for pino logger (dotansimha#700)
* feat: allow config option for pino logger
* remove process.exit
* test: basic tests setup (dotansimha#701)
* test: basic tests setup
* test: use fastif inject
* feat: testing util to simplify setup (dotansimha#703)
* Bump GraphQL Helix and use fastify's way to handle response (dotansimha#705)
* feat: remove uploads option
* Use File interface in resolvers, Blob as scalar name and Response as a return type of inject
* chore: downgrade versions will have changeset manage this
* ci: setup releases with changesets

Co-authored-by: Arda TANRIKULU <[email protected]>
Co-authored-by: Dotan Simha <[email protected]>
Co-authored-by: Laurin Quast <[email protected]>
Co-authored-by: Saihajpreet Singh <[email protected]>
  • Loading branch information
4 people authored Dec 9, 2021
1 parent 61edc43 commit 6620c77
Show file tree
Hide file tree
Showing 56 changed files with 10,518 additions and 6,268 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -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/main/docs/common-questions.md)
10 changes: 10 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
11 changes: 0 additions & 11 deletions .circleci/config.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.yarn/releases/** binary
/.yarn/plugins/** binary
21 changes: 0 additions & 21 deletions .github/stale.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Canary Release

on:
pull_request:
branches:
- next

jobs:
publish-canary:
name: Publish Canary
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout next
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
- uses: bahmutov/npm-install@v1
- name: Setup NPM credentials
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Release Canary
id: canary
uses: 'kamilkisiela/release-canary@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
with:
npm-token: ${{ secrets.NODE_AUTH_TOKEN }}
npm-script: 'yarn release:canary'
changesets: true
- name: Publish a message
if: steps.canary.outputs.released == 'true'
uses: 'kamilkisiela/pr-comment@master'
with:
commentKey: canary
message: |
The latest changes of this PR are available as canary in npm (based on the declared `changesets`):
```
${{ steps.canary.outputs.changesetsPublishedPackages}}
```
bot-token: ${{ secrets.GITHUB_TOKEN }}
bot: 'github-actions[bot]'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish a empty message
if: steps.canary.outputs.released == 'false'
uses: 'kamilkisiela/pr-comment@master'
with:
commentKey: canary
message: |
The latest changes of this PR are not available as canary, since there are no linked `changesets` for this PR.
bot-token: ${{ secrets.GITHUB_TOKEN }}
bot: 'github-actions[bot]'
github-token: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Tests
on:
push:
branches:
- next
pull_request:
branches:
- next

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12, 16]
steps:
- uses: actions/checkout@v2
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-17-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-17-yarn-
- name: Install Dependencies using Yarn
run: yarn
- run: yarn build
- run: yarn test
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16.x
uses: actions/setup-node@master
with:
node-version: 16.x

- name: Install Dependencies
run: npm install

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
publish: npm run release
commit: 'chore(release): update monorepo packages versions'
title: 'Upcoming Release Changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,14 @@ examples/**/package-lock.json
examples/**/node_modules
.idea
*.log
.vscode
# https://yarnpkg.com/getting-started/qa/#which-files-should-be-gitignored
.yarn/*
.pnp.*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

*.tsbuildinfo
coverage/
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
yarn.lock
.yarn/*
.pnp.*
!.yarn/patches
!.yarn/sdks
!.yarn/versions
# TODO: enable once we get the new version working
examples/
**/dist/**
coverage/
14 changes: 14 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "all",
"semi": false,
"overrides": [
{
"files": ".prettierrc",
"options": {
"parser": "json"
}
}
]
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["arcanis.vscode-zipfs", "esbenp.prettier-vscode"]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"files.autoSave": "onFocusChange",
"eslint.format.enable": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
9 changes: 9 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

631 changes: 631 additions & 0 deletions .yarn/releases/yarn-3.0.2.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarn/sdks/integrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!

integrations:
- vscode
20 changes: 20 additions & 0 deletions .yarn/sdks/prettier/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const { existsSync } = require(`fs`)
const { createRequire, createRequireFromPath } = require(`module`)
const { resolve } = require(`path`)

const relPnpApiPath = '../../../.pnp.cjs'

const absPnpApiPath = resolve(__dirname, relPnpApiPath)
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath)

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/index.js
require(absPnpApiPath).setup()
}
}

// Defer to the real prettier/index.js your application uses
module.exports = absRequire(`prettier/index.js`)
6 changes: 6 additions & 0 deletions .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "prettier",
"version": "2.4.1-sdk",
"main": "./index.js",
"type": "commonjs"
}
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/bin/tsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsc your application uses
module.exports = absRequire(`typescript/bin/tsc`);
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/bin/tsserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsserver
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsserver your application uses
module.exports = absRequire(`typescript/bin/tsserver`);
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/lib/tsc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const { existsSync } = require(`fs`)
const { createRequire, createRequireFromPath } = require(`module`)
const { resolve } = require(`path`)

const relPnpApiPath = '../../../../.pnp.cjs'

const absPnpApiPath = resolve(__dirname, relPnpApiPath)
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath)

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsc.js
require(absPnpApiPath).setup()
}
}

// Defer to the real typescript/lib/tsc.js your application uses
module.exports = absRequire(`typescript/lib/tsc.js`)
Loading

0 comments on commit 6620c77

Please sign in to comment.