Skip to content

Commit

Permalink
Upgrade to Remix v1 (#65)
Browse files Browse the repository at this point in the history
* Remove .npmrc and REMIX_TOKEN from GHA

* Upgrade packages, remove @remix-run/node and delete remix.env.d.ts

* Re-install @remix-run/node as dev dependency

* Upgrade examples

Co-authored-by: Sergio Xalambrí <[email protected]>
  • Loading branch information
sergiodxa and sergiodxa-silverback authored Nov 23, 2021
1 parent b39d922 commit 3b14683
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 80 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:
cache: 'npm'
- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}
- name: Setup Git
run: |
git config user.name 'Sergio Xalambrí'
Expand Down
20 changes: 1 addition & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ jobs:

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Build
run: npm run build
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

typecheck:
name: Typechecker
Expand All @@ -39,13 +35,9 @@ jobs:

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Typecheck
run: npm run typecheck
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

test:
name: Unit and Integration Tests
Expand All @@ -61,13 +53,9 @@ jobs:

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Test
run: npm run test -- --ci --coverage --maxWorkers=2
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

lint:
name: Linter
Expand All @@ -83,15 +71,9 @@ jobs:

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Build
run: npm run build
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Lint
run: npm run lint
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}
run: npm run lint
5 changes: 0 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ jobs:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm install
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}
- run: npm run build
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion examples/github/app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Outlet } from "react-router-dom";
import type { LinksFunction, LoaderFunction } from "remix";
import {
Links,
LiveReload,
Meta,
Outlet,
Scripts,
useCatch,
useLoaderData,
Expand Down
2 changes: 1 addition & 1 deletion examples/github/app/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Link } from "react-router-dom";
import {
Form,
Link,
LinksFunction,
LoaderFunction,
MetaFunction,
Expand Down
5 changes: 2 additions & 3 deletions examples/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"scripts": {
"build": "remix build",
"dev": "remix run",
"dev": "remix dev",
"postinstall": "remix setup node",
"start": "remix-serve build"
},
Expand All @@ -15,9 +15,8 @@
"dotenv": "^10.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "6.0.0-beta.8",
"remix": "*",
"remix-auth": "*"
"remix-auth": "file:../.."
},
"devDependencies": {
"@remix-run/dev": "*",
Expand Down
2 changes: 1 addition & 1 deletion examples/local/app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Outlet } from "react-router-dom";
import type { LinksFunction, LoaderFunction } from "remix";
import {
Links,
LiveReload,
Meta,
Outlet,
Scripts,
useCatch,
useLoaderData,
Expand Down
2 changes: 1 addition & 1 deletion examples/local/app/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Link } from "react-router-dom";
import {
Form,
Link,
LinksFunction,
LoaderFunction,
MetaFunction,
Expand Down
5 changes: 2 additions & 3 deletions examples/local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"scripts": {
"build": "remix build",
"dev": "remix run",
"dev": "remix dev",
"postinstall": "remix setup node",
"start": "remix-serve build"
},
Expand All @@ -14,9 +14,8 @@
"@remix-run/serve": "*",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "6.0.0-beta.8",
"remix": "*",
"remix-auth": "*"
"remix-auth": "file:../.."
},
"devDependencies": {
"@remix-run/dev": "*",
Expand Down
68 changes: 35 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
"README.md"
],
"peerDependencies": {
"@remix-run/react": "^0.21.0",
"@remix-run/server-runtime": "^0.21.0"
"@remix-run/react": "^1.0.0",
"@remix-run/server-runtime": "^1.0.0"
},
"devDependencies": {
"@babel/core": "^7.14.2",
"@babel/preset-env": "^7.14.1",
"@babel/preset-react": "^7.13.13",
"@babel/preset-typescript": "^7.13.0",
"@remix-run/node": "^0.21.0",
"@remix-run/react": "^0.21.0",
"@remix-run/server-runtime": "^0.21.0",
"@remix-run/node": "^1.0.3",
"@remix-run/react": "^1.0.0",
"@remix-run/server-runtime": "^1.0.0",
"@types/jest": "^26.0.23",
"@types/prop-types": "^15.7.4",
"@types/react": "^17.0.14",
Expand All @@ -68,7 +68,6 @@
"jest-fetch-mock": "^3.0.3",
"prettier": "^2.3.2",
"react": "^17.0.2",
"react-router-dom": "^6.0.0-beta.8",
"ts-node": "^9.1.1",
"typescript": "^4.3.5"
},
Expand Down
2 changes: 0 additions & 2 deletions remix.env.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"outDir": "./build"
},
"exclude": ["node_modules"],
"include": ["config/remix.env.d.ts", "src/**/*.ts", "src/**/*.tsx"]
"include": ["src/**/*.ts", "src/**/*.tsx"]
}

0 comments on commit 3b14683

Please sign in to comment.