Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for jsx-runtime #129

Merged
merged 45 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
461742f
feat: add support for jsx-runtime
JacopoPatroclo Feb 18, 2024
2284dfc
docs: update with example using tsconfig jsxImportSource
JacopoPatroclo Feb 19, 2024
749debb
feat: jsx-runtime
arthurfiorette Feb 22, 2024
9115c4b
style: formatted code
arthurfiorette Feb 22, 2024
c79676a
chore: jsx benchmark
arthurfiorette Feb 23, 2024
2a41a44
sty
arthurfiorette Feb 23, 2024
30016a6
code
arthurfiorette Feb 23, 2024
8483e53
fix tests
arthurfiorette Feb 23, 2024
316b232
fix bench
arthurfiorette Feb 23, 2024
1340015
doc: update readme to be react-jsx first
JacopoPatroclo Feb 23, 2024
eabb7fa
doc: update jsdocs for jsx and jsxs functions
JacopoPatroclo Feb 23, 2024
1e540f5
doc: add deprecation warning message to the top of the register file,…
JacopoPatroclo Feb 23, 2024
4d9cb00
doc: add serialization table in the readme file, update tests to be c…
JacopoPatroclo Feb 24, 2024
aaf7d9f
feat: improved jsx and createElement
arthurfiorette Feb 24, 2024
6419d25
deps: updated dependencies and benchmark
arthurfiorette Feb 24, 2024
2415990
feat: updates
arthurfiorette Feb 24, 2024
5b87e85
feat: added more serialization examples
arthurfiorette Feb 24, 2024
b7c1919
lockfile
arthurfiorette Feb 24, 2024
fc3c1b8
feat: migrate tests to use jsx-runtime by default
JacopoPatroclo Feb 25, 2024
c659145
doc: fix typo in output table
JacopoPatroclo Feb 25, 2024
799f392
fix: refactor project to be a pnpm workspace, refactor benchmarsk to …
JacopoPatroclo Feb 28, 2024
ad0f79f
initial monorepo with changesets
arthurfiorette Feb 29, 2024
c7f369d
changeset
arthurfiorette Feb 29, 2024
e4b3d27
nvm
arthurfiorette Feb 29, 2024
11c8307
feat: ts-html-plugin
arthurfiorette Feb 29, 2024
3d05717
feat: fastify-html-plugin
arthurfiorette Feb 29, 2024
a4d64c3
feat: removed MdnHomepage to a real world scenario
arthurfiorette Mar 1, 2024
2c75b94
feat: added notes regarding benchmarks
arthurfiorette Mar 1, 2024
bba98e2
docs: updated package json links
arthurfiorette Mar 1, 2024
d38983e
test: 100% coverage
arthurfiorette Mar 1, 2024
8eadee3
doc: fix grammar on benchmark readme, add reference to it on the root…
JacopoPatroclo Mar 2, 2024
932a955
feat: reserved key atttribute
arthurfiorette Mar 2, 2024
cc76ff7
feat: avoid hijacking reply
arthurfiorette Mar 2, 2024
73a07f1
code
arthurfiorette Mar 2, 2024
67ac1d2
packagejson
arthurfiorette Mar 2, 2024
c00efaf
ci
arthurfiorette Mar 2, 2024
9f35b92
lockfile
arthurfiorette Mar 2, 2024
b3732c2
ci
arthurfiorette Mar 2, 2024
b611195
vscode
arthurfiorette Mar 2, 2024
a9a765e
ts-html-plugin: solve path resolution issue on tests, add debug file …
JacopoPatroclo Mar 4, 2024
26fe409
refactor: renamed testing env var to a more descriptive one
arthurfiorette Mar 8, 2024
1d96f49
fix: test inconsistencies
arthurfiorette Mar 8, 2024
aa8973d
merge: merge main
arthurfiorette Mar 8, 2024
7a51612
chore: declaration maps for benchmarks
arthurfiorette Mar 9, 2024
f4656f4
chore: changeset
arthurfiorette Mar 9, 2024
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
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)
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
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