generated from react18-tools/turborepo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from react18-tools/rewrite
Rewrite
- Loading branch information
Showing
259 changed files
with
17,796 additions
and
4,471 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", | ||
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"commit": ["@changesets/cli/commit", { "skipCI": false }], | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
"ignore": ["@example/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ jobs: | |
if: github.event.repository.owner.login == 'react18-tools' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -21,25 +20,26 @@ jobs: | |
with: | ||
registry-url: https://registry.npmjs.org | ||
node-version: 20 | ||
- name: Setup Git | ||
run: | | ||
git config --global user.name "mayank1513" | ||
git config --global user.email "[email protected]" | ||
git fetch | ||
git checkout main | ||
git pull | ||
- run: npm i -g pnpm && pnpm i | ||
name: Install dependencies | ||
- name: Test | ||
run: npm test | ||
- run: git status && git clean -f -d && git status | ||
- run: git stash --include-untracked | ||
name: clean up working directory | ||
- run: npx @turbo/codemod update . && pnpm update --latest -w | ||
- run: npx @turbo/codemod update . && pnpm update --latest -r | ||
name: Update dependencies | ||
- run: pnpm build | ||
name: Build all apps to make sure it is not broken due to dependency upgrades | ||
- name: Run unit tests | ||
run: pnpm test | ||
- name: Generate/update docs | ||
run: pnpm doc | ||
- name: Setup Git | ||
run: | | ||
git config --global user.name "react18-tools" | ||
git config --global user.email "[email protected]" | ||
git fetch | ||
git checkout main | ||
- name: Save upgraded packages back to repo | ||
run: git add . && git commit -m "upgrade deps && docs" && git push origin main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Manually publish to NPM - Apply changeset in the workflow. | ||
|
||
# publish only when package json has changed - assuming version upgrade | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
if: github.event.repository.owner.login == 'react18-tools' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org | ||
- name: Setup Git | ||
run: | | ||
git config --global user.name "mayank1513" | ||
git config --global user.email "[email protected]" | ||
- run: npm i -g pnpm && pnpm i | ||
name: Install dependencies | ||
# fail and not publish if any of the unit tests are failing | ||
- name: Test | ||
run: pnpm test | ||
- name: clean up working directory | ||
run: git status && git clean -f -d && git status | ||
- name: Copy Readme file | ||
run: cp ./README.md ./lib # todo: uncomment this line while rebranding | ||
- name: Apply changesets, publish and create release, branches and tags | ||
run: node ./scripts/manual-publish.js | ||
env: | ||
BRANCH: ${{ github.ref_name }} | ||
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,26 +2,20 @@ name: Publish to NPM | |
|
||
# publish only when package json has changed - assuming version upgrade | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
paths: "lib/r18gs/package.json" | ||
paths: "lib/package.json" | ||
|
||
jobs: | ||
publish: | ||
# Don't run just after creating repo from template | ||
# Also avoid running after merging set-up PR | ||
if: github.event.repository.owner.login == 'react18-tools' | ||
if: github.run_number > 2 && github.event.repository.owner.login == 'react18-tools' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: write | ||
id-token: write | ||
|
||
defaults: | ||
run: | ||
working-directory: ./lib/r18gs | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -31,46 +25,22 @@ jobs: | |
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org | ||
- name: Setup Git | ||
run: | | ||
git config --global user.name "mayank1513" | ||
git config --global user.email "[email protected]" | ||
- run: npm i -g pnpm && pnpm i | ||
name: Install dependencies | ||
# fail and not publish if any of the unit tests are failing | ||
- name: Test | ||
run: pnpm test | ||
- name: publish to NPM | ||
run: pnpm build && pnpm publish-package | ||
continue-on-error: true | ||
- name: Copy Readme file | ||
run: cp ./README.md ./lib # will be uncommented while rebranding | ||
- name: Apply changesets, publish and create release, branches and tags | ||
run: node ./scripts/publish.js | ||
env: | ||
BRANCH: ${{ github.ref_name }} | ||
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OWNER: ${{ github.event.repository.owner.login }} | ||
REPO: ${{ github.event.repository.name }} | ||
|
||
- name: Create GitHub release | ||
run: | | ||
v=$(node -p -e "require('./package.json').version") | ||
gh release create $v --generate-notes --latest -n "$(sed '1,/^## /d;/^## /,$d' CHANGELOG.md)" --title "Release $v" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish canonical packages | ||
continue-on-error: true | ||
run: | | ||
sed -i -e "s/.*name.*/\t\"name\": \"@mayank1513\/r18gs\",/" package.json | ||
npm publish --provenance --access public | ||
sed -i -e "s/.*name.*/\t\"name\": \"react18-global-store\",/" package.json | ||
npm publish --provenance --access public | ||
sed -i -e "s/.*name.*/\t\"name\": \"react18-store\",/" package.json | ||
npm publish --provenance --access public | ||
sed -i -e "s/.*name.*/\t\"name\": \"react19-global-store\",/" package.json | ||
npm publish --provenance --access public | ||
sed -i -e "s/.*name.*/\t\"name\": \"react19-store\",/" package.json | ||
npm publish --provenance --access public | ||
sed -i -e "s/.*name.*/\t\"name\": \"r19gs\",/" package.json | ||
npm publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
|
||
- name: Mark scoped package as deprecated | ||
run: npm deprecate @mayank1513/r18gs "Please use https://www.npmjs.com/package/r18gs instead. We initially created scoped packages to have similarities with the GitHub Public Repository (which requires packages to be scoped). We are no longer using GPR and thus deprecating all scoped packages for which corresponding un-scoped packages exist." | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,8 @@ on: | |
- cron: "5 */8 * * *" | ||
jobs: | ||
test: | ||
if: github.run_number != 1 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
|
@@ -23,12 +22,11 @@ jobs: | |
continue-on-error: true | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
directory: ./lib/r18gs | ||
directory: ./lib | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
flags: r18gs | ||
- uses: paambaati/[email protected] | ||
continue-on-error: true | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageLocations: ./lib/r18gs/coverage/*.xml:clover | ||
coverageLocations: ./lib/coverage/*.xml:clover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,16 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# testing | ||
coverage | ||
|
||
# next.js | ||
.next/ | ||
out/ | ||
build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# turbo | ||
node_modules | ||
.turbo | ||
*.log | ||
.next | ||
dist | ||
dist-ssr | ||
*.local | ||
.env | ||
.cache | ||
|
||
# vercel | ||
.vercel | ||
# test coverage | ||
coverage | ||
|
||
# lock files | ||
*lock* | ||
# temporary files | ||
tsup.config.bundled* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
# ignore hbs files as prettier removes all spaces and makes it ugly | ||
*hbs | ||
docs | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Featured packages built with this template. | ||
|
||
> This file is automatically generated. Please refrain from editing it directly. To add your package, update `scripts/featured.json` in alphabetical order. | ||
- [esbuild-plugin-react18](https://github.com/react18-tools/esbuild-plugin-react18) - An esbuild plugin for compiling libraries compatible with React 18 server and client component, Nextjs13, and Nextjs14 | ||
- [esbuild-plugin-react18-css](https://github.com/react18-tools/esbuild-plugin-react18-css) - ESBuild plugin to handle CSS/SCSS modules, autoprefixer, etc. | ||
- [Nextjs-Themes](https://github.com/react18-tools/nextjs-themes) - 🤟 👉 Theme with confidence and Unleash the Power of React Server Components | ||
- [Persist-And-Sync](https://github.com/react18-tools/persist-and-sync) - Zustand middleware to easily persist and sync Zustand state between tabs / windows / iframes (Same Origin) | ||
- [React 18 Themes](https://github.com/react18-tools/react18-themes) - 🤟 👉 Unleash the Power of React Server Components | ||
- [React18 Global Store](https://github.com/react18-tools/react18-global-store) - A simple yet elegant, light weight, react18 global store to replace Zustand for better tree shaking. | ||
- [Zustand Sync Tabs](https://github.com/react18-tools/zustand-sync-tabs) - Zustand middleware to easily sync Zustand state between tabs / windows / iframes (Same Origin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.