Skip to content

Commit

Permalink
Merge pull request #55 from erictaylor/beta
Browse files Browse the repository at this point in the history
v3.0.0
  • Loading branch information
erictaylor authored Jun 2, 2023
2 parents 64424d2 + 7bb64ea commit 2832529
Show file tree
Hide file tree
Showing 84 changed files with 9,954 additions and 15,261 deletions.
11 changes: 0 additions & 11 deletions .cspell.json

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
indent_style = tab
indent_size = 2

[*.md]
indent_style = space
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

36 changes: 0 additions & 36 deletions .eslintrc

This file was deleted.

43 changes: 32 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,47 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['12.x', '14.x', '16.x']
node: ["16.x", "18.x", "20.x"]
os: [ubuntu-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Lint
run: yarn lint
- name: Rome
run: pnpm test:rome

- name: Build
run: yarn build
- name: TSC
run: pnpm test:tsc

- name: Test
run: yarn test --ci --coverage --maxWorkers=2
- name: Vitest
run: pnpm test:vitest --coverage
42 changes: 26 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,50 @@ on:
push:
branches:
- main
- beta

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: 🛎 Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: ⬢ Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: "18"

- name: 🔍 Set Yarn Cache Directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: 🧶 Get Yarn Cache
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 📦 Install Dependencies
run: yarn --frozen-lockfile
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: 🏗 Building
run: yarn build
run: pnpm build

- name: 🚀 Releasing
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
run: pnpm semantic-release
15 changes: 0 additions & 15 deletions .github/workflows/size-limit.yml

This file was deleted.

40 changes: 37 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
*.log
.DS_Store
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
.cache
.pnp
.pnp.js

# testing
coverage

# build
build
dist

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# node
**/node_modules

# hidden files
**/.*
!**/.gitkeep
!**/.storybook
!/.editorconfig
!/.github
!/.gitignore
!/.npmrc
!/.nvmrc
!/.vscode

# typescript
tsconfig.tsbuildinfo
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers = true
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

8 changes: 6 additions & 2 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"branches": ["main"],
}
"branches": [
"main",
{ "name": "beta", "prerelease": true },
{ "name": "alpha", "prerelease": true }
]
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"rome.rome",
"streetsidesoftware.code-spell-checker",
"ZixuanChen.vitest-explorer"
]
}
28 changes: 23 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.tsdk": "node_modules/typescript/lib"
"[javascript]": {
"editor.defaultFormatter": "rome.rome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "rome.rome"
},
"[json]": {
"editor.defaultFormatter": "rome.rome"
},
"[typescript]": {
"editor.defaultFormatter": "rome.rome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "rome.rome"
},
"editor.codeActionsOnSave": {
"source.fixAll.rome": true,
"source.organizeImports.rome": true
},
"editor.formatOnSave": true,
"eslint.enable": false,
"prettier.enable": false,
"typescript.tsdk": "node_modules/typescript/lib"
}
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,10 @@ A React router library enabling the render-as-you-fetch concurrent UI pattern.

**Yarr** is _yet another React router_ library, but with a focus on enabling the [render-as-you-fetch concurrent UI pattern](https://reactjs.org/docs/concurrent-mode-suspense.html) by offering both component **code preloading** and **data preloading**. This behavior is enabled even without opt-in to [React's experimental Concurrent Mode](https://it.reactjs.org/docs/concurrent-mode-intro.html).

Yarr was originally developed for use with [Relay](https://relay.dev) (_formally Relay Modern_) in September 2020 for internal use at [Contra](https://www.contra.com). It's since been open-sourced to give back to the community and promote Relay adoption.

## Getting Started

- [Step-by-step guide](/docs/guides/1-step-by-step-guide.md)

Community articles:

- [Getting started with Yarr!](https://medium.com/nerd-for-tech/getting-started-with-yarr-7d864266b9d1)
- [Yarr (yet another react router) | Let’s get started | Great react routing library](https://suneetbansal.medium.com/yarr-yet-another-react-router-lets-get-started-great-react-routing-library-3e550c0834d7)
- [Yarr와 Relay를 이용해 Render-as-you-fetch 라우팅을 구현하기](https://velog.io/@jaeholee/render-as-you-fetch-using-yarr-and-relay)
- [Is Yarr just another React Router?](https://medium.com/front-end-weekly/is-yarr-just-another-react-router-3208d6cdceda)

## Usage Examples

- [Parameterized Routing example](/docs/guides/2-parameterized-routing.md)
Expand All @@ -45,6 +36,10 @@ Community articles:
- [Hooks](/docs/api-reference/hooks.md)
- [Utils](/docs/api-reference/utils.md)

## Acknowledgements

**Yarr** was originally developed by [Eric Taylor](https://github.com/erictaylor) at [Contra](https://www.contra.com) to power Contra's [Relay](https://relay.dev) (_formally Relay Modern_) and React Suspense tech stack. It's since been open-sourced to give back to the community and promote Relay/Suspense adoption.

## License

[MIT License](/LICENSE)
[MIT](/LICENSE.md) © [Eric Taylor](https://github.com/erictaylor)
45 changes: 0 additions & 45 deletions bin/build-cjs.js

This file was deleted.

Loading

0 comments on commit 2832529

Please sign in to comment.