Skip to content

Commit

Permalink
Merge branch 'dev' into unblock-hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-ebey authored Aug 11, 2022
2 parents fac8b27 + ec78b00 commit 4577943
Show file tree
Hide file tree
Showing 51 changed files with 799 additions and 181 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-peaches-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Add support for .mjs and .cjs remix.config files.
5 changes: 5 additions & 0 deletions .changeset/curvy-drinks-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/react": patch
---

Previously, if an `action` was omitted from `<Form>` or `useFormAction`, the action value would default to `"."`. This is incorrect, as `"."` should resolve based on the current _path_, but an empty action resolves relative to the current _URL_ (including the search and hash values). We've fixed this to differentiate between the two.
5 changes: 5 additions & 0 deletions .changeset/four-ladybugs-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Allow importing `.sql` files as text
5 changes: 5 additions & 0 deletions .changeset/purple-ligers-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Make MDX builds deterministic
5 changes: 5 additions & 0 deletions .changeset/slow-apples-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/react": patch
---

Add subscribe method to transition manager to allow subscribing and un-subscribing for React 18 strict mode compliance.
8 changes: 8 additions & 0 deletions .changeset/stale-worms-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"remix": patch
"@remix-run/dev": patch
---

`import()` expects url-encoded strings, so the path must be properly escaped and (especially on Windows) absolute paths must pe prefixed with the `file://` protocol

dynamic import does not currently work inside of vm which jest relies on so we fall back to require for this case
2 changes: 1 addition & 1 deletion .github/workflows/reusable-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
id: playwright-version
shell: bash
run: |
playwright_version=$(npm info @playwright/test version)
playwright_version=$(node -e "console.log(require('@playwright/test/package.json').version)")
echo "::set-output name=version::${playwright_version}"
- name: 🤖 Cache Playwright binaries
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/stacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
if: github.repository == 'remix-run/remix'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stack:
- repo: "remix-run/indie-stack"
Expand Down Expand Up @@ -69,6 +70,7 @@ jobs:
needs: [setup]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stack:
- repo: "remix-run/indie-stack"
Expand Down Expand Up @@ -111,6 +113,7 @@ jobs:
if: github.repository == 'remix-run/remix'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stack:
- repo: "remix-run/indie-stack"
Expand Down Expand Up @@ -153,6 +156,7 @@ jobs:
needs: [setup]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stack:
- repo: "remix-run/indie-stack"
Expand Down Expand Up @@ -195,6 +199,7 @@ jobs:
needs: [setup]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stack:
- repo: "remix-run/indie-stack"
Expand Down
3 changes: 3 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,12 @@
- ianduvall
- illright
- imzshh
- ionut-botizan
- isaacrmoreno
- ishan-me
- IshanKBG
- itsMapleLeaf
- jacargentina
- jacob-ebey
- JacobParis
- jakewtaylor
Expand Down Expand Up @@ -301,6 +303,7 @@
- niwsa
- nobeeakon
- nordiauwu
- nrako
- nurul3101
- nvh95
- nwalters512
Expand Down
2 changes: 1 addition & 1 deletion examples/blog-tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@testing-library/cypress": "^8.0.2",
"@testing-library/dom": "^8.13.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^13.5.0",
"@types/eslint": "^8.4.1",
"@types/marked": "^4.0.3",
Expand Down
30 changes: 27 additions & 3 deletions integration/deterministic-build-output-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,35 @@ import globby from "globby";
import fs from "fs";
import path from "path";

import { createFixtureProject } from "./helpers/create-fixture";
import { createFixtureProject, js } from "./helpers/create-fixture";

test("builds deterministically under different paths", async () => {
let dir1 = await createFixtureProject();
let dir2 = await createFixtureProject();
// This test validates various flavors of remix virtual modules to ensure
// we get identical builds regardless of the parent paths. If a virtual
// module resolves or imports from absolute paths (e.g. via `path.resolve`),
// the build hashes may change even though the output is identical. This
// can cause broken apps (i.e. manifest mismatch) if the server and client
// are built separately.

// Virtual modules tested:
// * browserRouteModulesPlugin (implicitly tested by root route)
// * emptyModulesPlugin (via app/routes/foo.tsx' server import)
// * mdx (via app/routes/index.mdx)
// * serverAssetsManifestPlugin (implicitly tested by build)
// * serverEntryModulePlugin (implicitly tested by build)
// * serverRouteModulesPlugin (implicitly tested by build)
let init = {
files: {
"app/routes/index.mdx": "# hello world",
"app/routes/foo.tsx": js`
export * from "~/foo/bar.server";
export default () => "YAY";
`,
"app/foo/bar.server.ts": "export const meta = () => []",
},
};
let dir1 = await createFixtureProject(init);
let dir2 = await createFixtureProject(init);

expect(dir1).not.toEqual(dir2);

Expand Down
Loading

0 comments on commit 4577943

Please sign in to comment.