Skip to content

Commit

Permalink
Merge branch 'release-v1.6.1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Jun 22, 2022
2 parents 29acf2c + ca382b1 commit 5230ef1
Show file tree
Hide file tree
Showing 195 changed files with 2,238 additions and 964 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/deployments.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
name: 🚀 Deployment Tests

on:
repository_dispatch:
types: [release]
workflow_call:
secrets:
TEST_AWS_ACCESS_KEY_ID:
required: true
TEST_AWS_SECRET_ACCESS_KEY:
required: true
TEST_CF_ACCOUNT_ID:
required: true
TEST_CF_GLOBAL_API_KEY:
required: true
TEST_CF_EMAIL:
required: true
TEST_CF_PAGES_API_TOKEN:
required: true
TEST_CF_API_TOKEN:
required: true
TEST_DENO_DEPLOY_TOKEN:
required: true
TEST_FLY_TOKEN:
required: true
TEST_NETLIFY_TOKEN:
required: true
TEST_VERCEL_TOKEN:
required: true
TEST_VERCEL_USER_ID:
required: true

jobs:
arc_deploy:
Expand Down
100 changes: 64 additions & 36 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
if: github.repository == 'remix-run/remix'
runs-on: ubuntu-latest
outputs:
# allows this to be used in the `comment` job below
# allows this to be used in the `comment` job below - will be undefined if there's no release necessary
NEXT_VERSION: ${{ steps.version.outputs.NEXT_VERSION }}
steps:
- name: 🛑 Cancel Previous Runs
Expand All @@ -40,63 +40,91 @@ jobs:
# because we have a yarn.lock and caches efficiently.
uses: bahmutov/npm-install@v1

- name: ⤴️ Update Version
- name: ⤴️ Update Version if needed
id: version
run: |
git config --local user.email "[email protected]"
git config --local user.name "Remix Run Bot"
# get latest commit sha
SHA=$(git rev-parse HEAD)
SHORT_SHA=${SHA::7}
DATE=$(date '+%Y%m%d')
NEXT_VERSION=0.0.0-nightly-${SHORT_SHA}-${DATE}
echo ::set-output name=NEXT_VERSION::${NEXT_VERSION}
git checkout -b nightly/${NEXT_VERSION}
# get latest nightly tag
LATEST_NIGHTLY_TAG=$(git tag -l v0.0.0-nightly-\* --sort=-taggerdate | head -n 1)
if [ -z "$(git status --porcelain)" ]; then
echo "✨"
# check if last commit to dev starts would be the nightly tag we're about to create (minus the date)
# if it is, we'll skip the nightly creation
# if not, we'll create a new nightly tag
if [[ ${LATEST_NIGHTLY_TAG} == v0.0.0-nightly-${SHORT_SHA}-* ]]; then
echo "🛑 Latest nightly tag is the same as the latest commit sha, skipping nightly release"
else
echo "dirty working directory..."
git add .
git commit -m "dirty working directory..."
fi
git config --local user.email "[email protected]"
git config --local user.name "Remix Run Bot"
DATE=$(date '+%Y%m%d')
NEXT_VERSION=0.0.0-nightly-${SHORT_SHA}-${DATE}
echo ::set-output name=NEXT_VERSION::${NEXT_VERSION}
git checkout -b nightly/${NEXT_VERSION}
yarn run version ${NEXT_VERSION} --skip-prompt
if [ -z "$(git status --porcelain)" ]; then
echo "✨"
else
echo "dirty working directory..."
git add .
git commit -m "dirty working directory..."
fi
yarn run version ${NEXT_VERSION} --skip-prompt
fi
- name: 🏗 Build
if: steps.version.outputs.NEXT_VERSION
run: yarn build

- name: 🏷 Push Tag
if: steps.version.outputs.NEXT_VERSION
run: git push origin --tags

- name: 🔐 Setup npm auth
if: steps.version.outputs.NEXT_VERSION
run: |
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
- name: 🚀 Publish
if: steps.version.outputs.NEXT_VERSION
run: npm run publish

- name: 🐱 Create GitHub release
uses: actions/create-release@v1
with:
draft: false
prerelease: true
release_name: v${{ steps.version.outputs.NEXT_VERSION }}
tag_name: v${{ steps.version.outputs.NEXT_VERSION }}
env:
# need this token in order to have it trigger the comment and deployment test workflows
GITHUB_TOKEN: ${{ secrets.NIGHTLY_PAT }}

comment:
needs: [nightly]
name: 🛴 Kick off comment and deployment test workflows
if: github.repository == 'remix-run/remix'
runs-on: ubuntu-latest
steps:
- uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.NIGHTLY_PAT }}
event-type: release
client-payload: '{ "ref": "refs/tags/v${{ needs.nightly.outputs.NEXT_VERSION }}", "version": "${{ needs.nightly.outputs.NEXT_VERSION }}" }'
name: 📝 Comment on related issues and pull requests
if: github.repository == 'remix-run/remix' && needs.nightly.outputs.NEXT_VERSION
uses: remix-run/remix/.github/workflows/release-comments.yml@main
with:
ref: "refs/tags/v${{ needs.nightly.outputs.NEXT_VERSION }}"

deployments:
needs: [nightly]
name: 🚀 Deployment Tests
if: github.repository == 'remix-run/remix' && needs.nightly.outputs.NEXT_VERSION
uses: remix-run/remix/.github/workflows/deployments.yml@main
secrets:
TEST_AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
TEST_CF_ACCOUNT_ID: ${{ secrets.TEST_CF_ACCOUNT_ID }}
TEST_CF_GLOBAL_API_KEY: ${{ secrets.TEST_CF_GLOBAL_API_KEY }}
TEST_CF_EMAIL: ${{ secrets.TEST_CF_EMAIL }}
TEST_CF_PAGES_API_TOKEN: ${{ secrets.TEST_CF_PAGES_API_TOKEN }}
TEST_CF_API_TOKEN: ${{ secrets.TEST_CF_API_TOKEN }}
TEST_DENO_DEPLOY_TOKEN: ${{ secrets.TEST_DENO_DEPLOY_TOKEN }}
TEST_FLY_TOKEN: ${{ secrets.TEST_FLY_TOKEN }}
TEST_NETLIFY_TOKEN: ${{ secrets.TEST_NETLIFY_TOKEN }}
TEST_VERCEL_TOKEN: ${{ secrets.TEST_VERCEL_TOKEN }}
TEST_VERCEL_USER_ID: ${{ secrets.TEST_VERCEL_USER_ID }}

stacks:
needs: [nightly]
name: 🥞 Remix Stacks Test
if: github.repository == 'remix-run/remix' && needs.nightly.outputs.NEXT_VERSION
uses: remix-run/remix/.github/workflows/stacks.yml@main
with:
version: "${{ needs.nightly.outputs.NEXT_VERSION }}"
16 changes: 12 additions & 4 deletions .github/workflows/release-comments.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: 📝 Comment on Release

on:
repository_dispatch:
types: [release]
workflow_call:
inputs:
ref:
required: true
type: string

jobs:
comment:
Expand All @@ -23,10 +26,15 @@ jobs:
# even though this is called "npm-install" it does use yarn to install
# because we have a yarn.lock and caches efficiently.
uses: bahmutov/npm-install@v1
with:
working-directory: ./scripts/release

- name: 📝 Comment on issues
run: node ./scripts/release/comment.mjs
working-directory: ./scripts/release
run: node -r esbuild-register ./comment.ts
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ github.token }}
VERSION: ${{ github.event.client_payload.ref }}
VERSION: ${{ inputs.ref }}
DEFAULT_BRANCH: "main"
NIGHTLY_BRANCH: "dev"
39 changes: 31 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,35 @@ jobs:

comment:
needs: [manual]
name: 🛴 Kick off comment and deployment test workflows
name: 📝 Comment on related issues and pull requests
if: github.repository == 'remix-run/remix'
runs-on: ubuntu-latest
steps:
- uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.NIGHTLY_PAT }}
event-type: release
client-payload: '{ "ref": "${{ github.ref }}", "version": "${{ github.ref_name }}" }'
uses: remix-run/remix/.github/workflows/release-comments.yml@main
with:
ref: ${{ github.ref }}

# deployments:
# needs: [manual]
# name: 🚀 Deployment Tests
# if: github.repository == 'remix-run/remix'
# uses: remix-run/remix/.github/workflows/deployments.yml@main
# secrets:
# TEST_AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
# TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
# TEST_CF_ACCOUNT_ID: ${{ secrets.TEST_CF_ACCOUNT_ID }}
# TEST_CF_GLOBAL_API_KEY: ${{ secrets.TEST_CF_GLOBAL_API_KEY }}
# TEST_CF_EMAIL: ${{ secrets.TEST_CF_EMAIL }}
# TEST_CF_PAGES_API_TOKEN: ${{ secrets.TEST_CF_PAGES_API_TOKEN }}
# TEST_CF_API_TOKEN: ${{ secrets.TEST_CF_API_TOKEN }}
# TEST_DENO_DEPLOY_TOKEN: ${{ secrets.TEST_DENO_DEPLOY_TOKEN }}
# TEST_FLY_TOKEN: ${{ secrets.TEST_FLY_TOKEN }}
# TEST_NETLIFY_TOKEN: ${{ secrets.TEST_NETLIFY_TOKEN }}
# TEST_VERCEL_TOKEN: ${{ secrets.TEST_VERCEL_TOKEN }}
# TEST_VERCEL_USER_ID: ${{ secrets.TEST_VERCEL_USER_ID }}

stacks:
needs: [manual]
name: 🥞 Remix Stacks Test
if: github.repository == 'remix-run/remix'
uses: remix-run/remix/.github/workflows/stacks.yml@main
with:
version: ${{ github.ref_name }}
11 changes: 7 additions & 4 deletions .github/workflows/stacks.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: 🥞 Remix Stacks Test

on:
repository_dispatch:
types: [release]
workflow_call:
inputs:
version:
required: true
type: string

jobs:
setup:
Expand All @@ -27,9 +30,9 @@ jobs:
with:
node-version: 16

- name: ⚒️ Create new ${{ matrix.stack.name }} app with ${{ github.event.client_payload.version }}
- name: ⚒️ Create new ${{ matrix.stack.name }} app with ${{ inputs.version }}
run: |
npx -y create-remix@${{ github.event.client_payload.version }} ${{ matrix.stack.name }} --template ${{ matrix.stack.repo }} --typescript --no-install
npx -y create-remix@${{ inputs.version }} ${{ matrix.stack.name }} --template ${{ matrix.stack.repo }} --typescript --no-install
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
Expand Down
2 changes: 1 addition & 1 deletion .vscode/deno_resolve_npm_imports.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"// Dependency management is done through `npm` and `node_modules/` instead.": "",
"// Deno-only dependencies may be imported via URL imports (without using import maps).": "",
"imports": {
"@remix-run/server-runtime": "https://esm.sh/@remix-run/[email protected].0",
"@remix-run/server-runtime": "https://esm.sh/@remix-run/[email protected].1",
"mime": "https://esm.sh/[email protected]"
}
}
5 changes: 5 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
- dan-gamble
- danielweinmann
- davecalnan
- davecranwell-vocovo
- DavidHollins6
- davongit
- denissb
Expand Down Expand Up @@ -155,6 +156,7 @@
- jaydiablo
- jca41
- jdeniau
- JeffBeltran
- jenseng
- jeremyjfleming
- jesse-deboer
Expand Down Expand Up @@ -263,10 +265,12 @@
- mskoroglu
- msutkowski
- mtt87
- mush159
- na2hiro
- nareshbhatia
- navid-kalaei
- nexxeln
- ni554n
- nicholaschiang
- niconiahi
- nielsdb97
Expand Down Expand Up @@ -359,6 +363,7 @@
- vimutti77
- visormatt
- vkrol
- vlindhol
- weavdale
- wKovacs64
- wladiston
Expand Down
12 changes: 4 additions & 8 deletions docs/api/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ A lot of Remix APIs aren't imported from the `"@remix-run/*"` packages, but are
This file has a few build and development configuration options, but does not actually run on your server.

```tsx filename=remix.config.js
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
appDirectory: "app",
assetsBuildDirectory: "public/build",
Expand Down Expand Up @@ -66,7 +64,7 @@ The port number to use for the dev websocket server. Defaults to 8002.

This is an array of globs (via [minimatch][minimatch]) that Remix will match to
files while reading your `app/routes` directory. If a file matches, it will be
ignored rather that treated like a route module. This is useful for ignoring
ignored rather than treated like a route module. This is useful for ignoring
dotfiles (like `.DS_Store` files) or CSS/test files you wish to colocate.

### publicPath
Expand Down Expand Up @@ -143,10 +141,8 @@ A list of regex patterns that determines if a module is transpiled and included

For example, the `unified` ecosystem is all ESM-only. Let's also say we're using a `@sindresorhus/slugify` which is ESM-only as well. Here's how you would be able to consume those packages in a CJS app without having to use dynamic imports:

```ts filename=remix.config.js lines=[10-15]
/**
* @type {import('@remix-run/dev').AppConfig}
*/
```ts filename=remix.config.js lines=[8-13]
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
appDirectory: "app",
assetsBuildDirectory: "public/build",
Expand Down
7 changes: 5 additions & 2 deletions docs/api/remix.md
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ This is the type of state the fetcher is in. It's like `fetcher.state`, but more

- **actionReload** - The action from an "actionSubmission" returned data and the loaders on the page are being reloaded.
- **actionRedirect** - The action from an "actionSubmission" returned a redirect and the page is transitioning to the new location.
- **load** - A route's loader is being called without a submission (`fetcher.load()`).
- **normalLoad** - A route's loader is being called without a submission (`fetcher.load()`).

#### `fetcher.submission`

Expand Down Expand Up @@ -2042,7 +2042,10 @@ const { getSession, commitSession, destroySession } =

// all of these are optional
domain: "remix.run",
expires: new Date(Date.now() + 60_000),
// Expires can also be set (although maxAge overrides it when used in combination).
// Note that this method is NOT recommended as `new Date` creates only one date on each server deployment, not a dynamic date in the future!
//
// expires: new Date(Date.now() + 60_000),
httpOnly: true,
maxAge: 60,
path: "/",
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/data-writes.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ You can ship this code as-is. The browser will handle the pending UI and interru

### Graduate to `<Form>` and add pending UI

Let's use progressive enhancement to make this UX a bit more fancy. By changing it from `<Form reloadDocument>` to `<Form>`, Remix will emulate the browser behavior with `fetch`. It will also give you access to the pending form data so you can build pending UI.
Let's use progressive enhancement to make this UX a bit more fancy. By changing it from `<form>` to `<Form>`, Remix will emulate the browser behavior with `fetch`. It will also give you access to the pending form data so you can build pending UI.

```tsx [2, 11]
import { redirect } from "@remix-run/node"; // or "@remix-run/cloudflare"
Expand Down
1 change: 1 addition & 0 deletions docs/guides/migrating-react-router-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ Further configuration is optional, but the following may be helpful to optimize
Every Remix app accepts a `remix.config.js` file in the project root. While its settings are optional, we recommend you include a few of them for clarity's sake. See the [docs on configuration][docs-on-configuration] for more information about all available options.

```js filename=remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
appDirectory: "app",
ignoredRouteFiles: ["**/.*"],
Expand Down
Loading

0 comments on commit 5230ef1

Please sign in to comment.