Skip to content

Commit

Permalink
✨ NEW: update with sveltekit next.483 & import form @kitql/all-in (#215)
Browse files Browse the repository at this point in the history
* ⚡ UPDATE: yarn to pnpm

* ✨ NEW: bob v4

* ✨ NEW: tubo build

* 👌 FIX: lint

* ✨ NEW: full Turbo

* 🚧 NEW: ci to pnpm

* 🚧 UPDATE: site step 1

* 🚧 UPDATE: v1

* 🐛 FIX: file location

* 👷 UPDATE: CI

* ♻️ UPDATE: files

* 🚧 UPDATE: tentative

* ♻️ UPDATE: tsconf

* ⚡ UPDATE: no-lonely-if

* 🚧 IMPROVE: bob & turbo

* 🐛 FIX: alias

* 👌 FIX: prettier

* 🎉 NEW: website2

* 💥 REMOVE: website2

* ✨ NEW: handle

* 🚸 IMPROVE: packaging

* 💥 REMOVE: website

* 🚧 NEW: hooks

* 🚧 UPDATE: website

* ✨ NEW: hooks!!!

* 🚧 NEW: prisma option

* 👌 UPDATE: linting

* 🐛 FIX: pre build

* 👷 IMPROVE: scripts

* 🐛 FIX: gen module-codegen

* ✨ IMPROVE: build working

* 🎉 DOC: doc update

* 👌 FIX: lint

* ⚡ DOC: update (except demo)

* ✨ UPDATE: dep

* ✨ UPDATE: coverage

* ✅ NEW: tests

* 🚸 IMPROVE: namings

* 🎉 UPDATE: pre version

* ✨ NEW: graphiql offline support

* 🐛 FIX: dep
  • Loading branch information
jycouet committed Sep 16, 2022
1 parent a64a624 commit 6261921
Show file tree
Hide file tree
Showing 80 changed files with 15,995 additions and 15,099 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
@@ -1,5 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
"$schema": "https://unpkg.com/@changesets/config@2.1.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "jycouet/kitql" }],
"commit": false,
"linked": [],
Expand Down
10 changes: 10 additions & 0 deletions .changeset/late-ligers-do.md
@@ -0,0 +1,10 @@
---
'@kitql/all-in': minor
'@kitql/helper': minor
'@kitql/module-codegen': minor
'@kitql/template': minor
'vite-plugin-watch-and-run': minor
'website': minor
---

update with sveltekit next.483 & import form @kitql/all-in
13 changes: 13 additions & 0 deletions .changeset/pre.json
@@ -0,0 +1,13 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"@kitql/all-in": "0.7.10",
"@kitql/helper": "0.5.0",
"@kitql/module-codegen": "0.3.12",
"@kitql/template": "0.3.2",
"vite-plugin-watch-and-run": "1.0.3",
"website": "0.0.2"
},
"changesets": []
}
4 changes: 3 additions & 1 deletion .eslintrc.cjs
Expand Up @@ -9,8 +9,10 @@ module.exports = {
'no-restricted-syntax': 'off',
'import/no-default-export': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-namespace': 'off',
},
ignorePatterns: ['examples', 'website'],
ignorePatterns: ['examples', 'website', 'dist'],
plugins: ['svelte3'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
Expand Down
36 changes: 9 additions & 27 deletions .github/workflows/ci.yml
@@ -1,16 +1,10 @@
name: Tests

on:
# pull requests to master
pull_request:
paths:
- '**'

# every commit on master
push:
branches:
- main

jobs:
build:
name: Tests
Expand All @@ -22,29 +16,17 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 17.5.0
cache: 'yarn'

- uses: actions/cache@v2
- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn

- name: Install Dependencies
run: yarn
nodeVersion: 18
packageManager: pnpm

- name: Build Packages
run: yarn build
- name: 🚧 Build Packages
run: pnpm run build

- name: Run Tests
run: yarn test
- name: 👌 Run Tests
run: pnpm run test

- name: 🧹 Prettier Check
run: yarn prettier:check
run: pnpm run prettier:check
51 changes: 9 additions & 42 deletions .github/workflows/release.yml
Expand Up @@ -6,45 +6,12 @@ on:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: Publishing
steps:
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
email=$NPM_EMAIL
name=$NPM_NAME
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_NAME: ${{ secrets.NPM_NAME }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Checkout Repo
uses: actions/checkout@v3
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
uses: actions/setup-node@v3
with:
node-version: 17

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
commit: ':package: RELEASE: new version'
title: ':package: RELEASE: preparing next version'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
stable:
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
with:
releaseScript: release # script to run as part of publish command
nodeVersion: 17
secrets:
packageManager: pnpm
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,5 +1,4 @@
node_modules/
yarn-error.log
dist/
.bob/
tsconfig.tsbuildinfo
Expand All @@ -9,3 +8,5 @@ coverage/
.svelte-kit/
.husky/_/
.env

.turbo
2 changes: 1 addition & 1 deletion .husky/pre-push
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint
npm run lint
File renamed without changes.
2 changes: 1 addition & 1 deletion .prettierignore
Expand Up @@ -12,4 +12,4 @@ website/docs/**/*.mdx
README.md

$houdini
$kitql
_kitql
2 changes: 1 addition & 1 deletion .vscode/settings.json
Expand Up @@ -8,7 +8,7 @@
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#422c74",
"activityBarBadge.foreground": "#e7e7e7",
"editorRuler.foreground": "#ff4081",
"editorRuler.foreground": "#ff3e00",
"sash.hoverBorder": "#2f7c47",
"statusBar.background": "#215732",
"statusBar.foreground": "#e7e7e7",
Expand Down
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -59,7 +59,7 @@ You have 3 main options to use `KitQL`:
## ✨ Contributors

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-19-orange.svg)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-20-orange.svg)](#contributors)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand All @@ -70,23 +70,24 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<table>
<tr>
<td align="center"><a href="http://www.dynamicprocess.io"><img src="https://avatars.githubusercontent.com/u/5312607?v=4" width="100px;" alt=""/><br /><sub><b>JYC</b></sub></a></td>
<td align="center"><a href="https://alec.aivazis.com/"><img src="https://avatars.githubusercontent.com/u/916317?v=4" width="100px;" alt=""/><br /><sub><b>Alec Aivazis</b></sub></a></td>
<td align="center"><a href="http://linkedin.com/in/julian-bruxelle"><img src="https://avatars.githubusercontent.com/u/36154424?v=4" width="100px;" alt=""/><br /><sub><b>Julian BRUXELLE</b></sub></a></td>
<td align="center"><a href="https://github.com/richarddavenport"><img src="https://avatars.githubusercontent.com/u/3596012?v=4" width="100px;" alt=""/><br /><sub><b>Richard Davenport</b></sub></a></td>
<td align="center"><a href="https://github.com/cya"><img src="https://avatars.githubusercontent.com/u/795915?v=4" width="100px;" alt=""/><br /><sub><b>Yuriy Chertkov</b></sub></a></td>
<td align="center"><a href="https://github.com/frederikhors"><img src="https://avatars.githubusercontent.com/u/41120635?v=4" width="100px;" alt=""/><br /><sub><b>frederikhors</b></sub></a></td>
<td align="center"><a href="https://scottspence.com"><img src="https://avatars.githubusercontent.com/u/234708?v=4" width="100px;" alt=""/><br /><sub><b>Scott Spence</b></sub></a></td>
<td align="center"><a href="http://szery.net.pl"><img src="https://avatars.githubusercontent.com/u/4786095?v=4" width="100px;" alt=""/><br /><sub><b>Łukasz Wiśniewski</b></sub></a></td>
</tr>
<tr>
<td align="center"><a href="http://szery.net.pl"><img src="https://avatars.githubusercontent.com/u/4786095?v=4" width="100px;" alt=""/><br /><sub><b>Łukasz Wiśniewski</b></sub></a></td>
<td align="center"><a href="https://github.com/AlexanderBacklund"><img src="https://avatars.githubusercontent.com/u/22005025?v=4" width="100px;" alt=""/><br /><sub><b>Alexander Backlund</b></sub></a></td>
<td align="center"><a href="https://graphql.wtf"><img src="https://avatars.githubusercontent.com/u/950181?v=4" width="100px;" alt=""/><br /><sub><b>Jamie Barton</b></sub></a></td>
<td align="center"><a href="https://github.com/gregoryforel"><img src="https://avatars.githubusercontent.com/u/4669234?v=4" width="100px;" alt=""/><br /><sub><b>GregFo</b></sub></a></td>
<td align="center"><a href="https://github.com/scottBowles"><img src="https://avatars.githubusercontent.com/u/59491167?v=4" width="100px;" alt=""/><br /><sub><b>Scott Bowles</b></sub></a></td>
<td align="center"><a href="http://happycollision.com"><img src="https://avatars.githubusercontent.com/u/3663628?v=4" width="100px;" alt=""/><br /><sub><b>Don Denton</b></sub></a></td>
<td align="center"><a href="https://github.com/B2o5T"><img src="https://avatars.githubusercontent.com/u/7361780?v=4" width="100px;" alt=""/><br /><sub><b>Dimitri POSTOLOV</b></sub></a></td>
<td align="center"><a href="https://github.com/nikfp"><img src="https://avatars.githubusercontent.com/u/46945607?v=4" width="100px;" alt=""/><br /><sub><b>Nik F P</b></sub></a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/nikfp"><img src="https://avatars.githubusercontent.com/u/46945607?v=4" width="100px;" alt=""/><br /><sub><b>Nik F P</b></sub></a></td>
<td align="center"><a href="https://github.com/dminikm"><img src="https://avatars.githubusercontent.com/u/9631648?v=4" width="100px;" alt=""/><br /><sub><b>Dominik Meca</b></sub></a></td>
<td align="center"><a href="https://github.com/Giovannini"><img src="https://avatars.githubusercontent.com/u/5586669?v=4" width="100px;" alt=""/><br /><sub><b>Thomas GIOVANNINI</b></sub></a></td>
<td align="center"><a href="https://github.com/Nukiloco"><img src="https://avatars.githubusercontent.com/u/16618467?v=4" width="100px;" alt=""/><br /><sub><b>Nukiloco</b></sub></a></td>
Expand Down
34 changes: 0 additions & 34 deletions bob.config.js

This file was deleted.

59 changes: 27 additions & 32 deletions package.json
Expand Up @@ -5,52 +5,47 @@
"private": true,
"license": "MIT",
"scripts": {
"ws": "workspace",
"prepare": "husky install && cd packages/all-in && yarn prepare",
"dev:t": "yarn build && yarn workspace @kitql/template dev",
"dev:w": "cd website && yarn dev",
"prepare": "husky install",
"dev:w": "cd website && npm run dev",
"test": "vitest --coverage",
"lint": "eslint --ignore-path .prettierignore .",
"prettier": "prettier --write --list-different .",
"prettier:check": "prettier --check .",
"test:ci": "vitest run --coverage",
"test:update-badge": "yarn update-badge",
"test:update-badge": "npm run update-badge",
"prebuild": "rimraf packages/*/dist",
"build": "tsc --project tsconfig.json && bob build && rm -rf packages/client/dist/lib/graphql && yarn workspace @kitql/all-in package",
"release:version": "yarn changeset version",
"release": "yarn build && changeset publish",
"reset": "git clean -xdf",
"update": "npm exec --workspaces -- npx npm-check-updates -u -p yarn"
},
"workspaces": {
"packages": [
"packages/*",
"kit-modules/*",
"website"
]
"build": "bob build && pnpm --filter @kitql/all-in build",
"release:version": "npm run changeset version",
"release": "npm run build && changeset publish",
"reset": "git clean -xdf"
},
"workspaces": [
"packages/*",
"kit-modules/*",
"website"
],
"devDependencies": {
"@babel/preset-env": "7.16.11",
"@babel/preset-typescript": "7.16.7",
"@changesets/changelog-github": "0.4.5",
"@changesets/cli": "2.23.0",
"@theguild/eslint-config": "0.0.1",
"@theguild/prettier-config": "0.0.1",
"@vitest/ui": "0.4.1",
"bob-the-bundler": "1.6.1",
"c8": "7.11.0",
"@changesets/changelog-github": "0.4.6",
"@changesets/cli": "2.24.4",
"@theguild/eslint-config": "0.0.2",
"@theguild/prettier-config": "0.0.3",
"@vitest/coverage-c8": "^0.23.2",
"@vitest/ui": "0.23.2",
"bob-the-bundler": "4.0.0",
"c8": "7.12.0",
"check-code-coverage": "1.10.0",
"eslint": "8.23.1",
"husky": "8.0.1",
"jsdom": "19.0.0",
"jsdom": "20.0.0",
"prettier": "2.7.1",
"prettier-plugin-svelte": "2.7.0",
"rimraf": "3.0.2",
"svelte2tsx": "^0.5.12",
"typescript": "4.5.5",
"vitest": "0.4.1"
"svelte": "3.50.1",
"svelte2tsx": "^0.5.17",
"typescript": "4.8.3",
"vitest": "0.23.2"
},
"volta": {
"node": "17.4.0",
"yarn": "1.22.17"
"node": "17.4.0"
}
}
2 changes: 2 additions & 0 deletions packages/all-in/.gitignore
Expand Up @@ -6,3 +6,5 @@ node_modules
.env
.env.*
!.env.example

_kitql
30 changes: 30 additions & 0 deletions packages/all-in/.graphqlrc.yaml
@@ -0,0 +1,30 @@
---
projects:
default:
schema:
- src/lib/modules/**/typedefs/*.graphql
# - $houdini/graphql/schema.graphql
documents:
- src/lib/modules/**/graphql/*.gql
# - $houdini/graphql/documents.gql
extensions:
codegen:
generates:
src/lib/modules:
preset: graphql-modules
presetConfig:
baseTypesPath: '../graphql/_kitql/graphqlTypes.ts'
importBaseTypesFrom: '$graphql/_kitql/graphqlTypes'
filename: _kitql/moduleTypes.ts
plugins:
- typescript
- typescript-resolvers
config:
contextType: '$graphql/kitQLServer#IKitQLContext'
useTypeImports: true
# scalars:
# - Date: "../helpers/scalarTypes#CodegenDate"
# DateTime: Date
# PrismaDecimal: "../helpers/scalarTypes#CodegenDecimal"
config:
useTypeImports: true
17 changes: 17 additions & 0 deletions packages/all-in/.kitql.yaml
@@ -0,0 +1,17 @@
generates:
src/lib/graphql/_kitql:
modules:
- src/lib/modules/*
# - packages/modules/*(_edge)

actions:
# createEnumsModule:
# prismaFile: prisma/schema.prisma
# enumsModuleFolder: src/lib/modules
mergeModuleTypedefs: true
mergeModuleResolvers: true
mergeContexts: true
mergeModules: true

moduleOutputFolder: _kitql
importBaseTypesFrom: $graphql/_kitql/graphqlTypes

1 comment on commit 6261921

@vercel
Copy link

@vercel vercel bot commented on 6261921 Sep 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kitql – ./

kitql-git-main-jycouet.vercel.app
kitql-jycouet.vercel.app
www.kitql.dev
kitql.vercel.app
kitql.dev

Please sign in to comment.