Skip to content

Commit

Permalink
Added support for jsx-runtime & moved to pnpm workspace (#129)
Browse files Browse the repository at this point in the history
Co-authored-by: Arthur Fiorette <[email protected]>
  • Loading branch information
JacopoPatroclo and arthurfiorette authored Mar 10, 2024
1 parent 5569733 commit f6a8c11
Show file tree
Hide file tree
Showing 143 changed files with 9,974 additions and 5,853 deletions.
9 changes: 9 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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)
5 changes: 5 additions & 0 deletions .changeset/calm-pants-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@kitajs/html': patch
---

Added support for react-jsx runtime
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "kitajs/kitajs" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/gold-islands-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@kitajs/html': patch
---

Fixed triple slash directives for jsx-runtime
7 changes: 7 additions & 0 deletions .changeset/hot-meals-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@kitajs/fastify-html-plugin': major
'@kitajs/html': major
'@kitajs/ts-html-plugin': major
---

Ported to ReactJSX runtime.
5 changes: 5 additions & 0 deletions .changeset/long-elephants-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@kitajs/fastify-html-plugin': patch
---

Updated Dependencies
5 changes: 5 additions & 0 deletions .changeset/mighty-kids-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@kitajs/html': patch
---

Reserved 'key' attribute to prevent use of it
6 changes: 6 additions & 0 deletions .changeset/soft-chairs-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@kitajs/ts-html-plugin': patch
'@kitajs/html': patch
---

Avoid hijacking fastify reply
29 changes: 21 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: Code CI
name: CI Flow

on:
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Build and test code
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
name: CI flow ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]

steps:
- name: Checkout
Expand All @@ -25,10 +30,18 @@ jobs:
- name: Install packages
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Link build
run: pnpm install --frozen-lockfile

- name: Test
run: pnpm test

- name: Codecov upload
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Publish to Codecov
uses: codecov/codecov-action@v4
with:
# Codecov backend may be unstable
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: 'CodeQL'

on:
push:
branches: [main]
branches: [master]
paths: ['**.js', '**.jsx', '**.ts', '**.tsx']
pull_request:
branches: [main]
branches: [master]
schedule:
- cron: '0 0/12 * * *'

Expand Down
File renamed without changes.
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release Flow

on:
push:
branches: [master]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}

steps:
- name: Checkout
uses: actions/checkout@v4

# https://github.com/actions/checkout/issues/1471
- name: Fetch tags
run: git fetch --prune --unshallow --tags

- name: Setup pnpm
uses: pnpm/action-setup@v2

- name: Setup node and restore cached dependencies
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install packages
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Link build
run: pnpm install --frozen-lockfile

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: 'chore: update versions'
title: 'Release plan'

# https://github.com/changesets/action/issues/246
# https://github.com/changesets/changesets/pull/674
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.AUTOMERGE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

node_modules

index.tsbuildinfo
dist
coverage
coverage

*.log
12 changes: 12 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env sh

FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0

# Prettify all selected files
echo "$FILES" | xargs ./node_modules/.bin/prettier --ignore-unknown --write

# Add back the modified/prettified files to staging
echo "$FILES" | xargs git add

exit 0
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shell-emulator=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.7.0
20.8.1
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"cSpell.words": ["KITA"]
}
Loading

0 comments on commit f6a8c11

Please sign in to comment.