From 99329de463fbd7c4326675777b426aba434086d6 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Tue, 23 Aug 2022 20:23:52 -0400 Subject: [PATCH 01/29] test: enable webkit testing for playwright (#4049) --- .github/workflows/release-test.yml | 2 +- .github/workflows/reusable-test.yml | 44 ++++++----------------------- .github/workflows/test.yml | 2 +- integration/form-test.ts | 14 +++++++-- integration/playwright.config.ts | 6 ++++ 5 files changed, 27 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index e15c4b4e3bf..c5972bcec8e 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -14,6 +14,6 @@ on: jobs: test: if: github.repository == 'remix-run/remix' - uses: remix-run/remix/.github/workflows/reusable-test.yml@main + uses: ./.github/workflows/reusable-test.yml with: node_version: "[14, 16, 18]" diff --git a/.github/workflows/reusable-test.yml b/.github/workflows/reusable-test.yml index 1bf11c63db5..5faa7f86efb 100644 --- a/.github/workflows/reusable-test.yml +++ b/.github/workflows/reusable-test.yml @@ -12,6 +12,7 @@ on: env: CI: true + CYPRESS_INSTALL_BINARY: 0 jobs: build: @@ -97,7 +98,7 @@ jobs: run: "yarn test:primary" integration: - name: "👀 Integration Test: (OS: ${{ matrix.os }} Node: ${{ matrix.node }})" + name: "👀 Integration Test: (OS: ${{ matrix.os }} Node: ${{ matrix.node }} Browser: ${{ matrix.browser }})" strategy: fail-fast: false matrix: @@ -106,13 +107,10 @@ jobs: - ubuntu-latest # - macos-latest - windows-latest - include: - - os: ubuntu-latest - playwright_binary_path: ~/.cache/ms-playwright - # - os: macos-latest - # playwright_binary_path: ~/Library/Caches/ms-playwright - - os: windows-latest - playwright_binary_path: '~\\AppData\\Local\\ms-playwright' + browser: + - chromium + # - firefox + - webkit runs-on: ${{ matrix.os }} steps: @@ -131,34 +129,8 @@ jobs: - name: 📥 Install deps run: yarn --frozen-lockfile - # playwright recommends if you cache the binaries to keep it tied to the version of playwright you are using. - # https://playwright.dev/docs/ci#caching-browsers - - name: 🕵️‍♂️ Get current Playwright version - id: playwright-version - shell: bash - run: | - playwright_version=$(node -e "console.log(require('@playwright/test/package.json').version)") - echo "::set-output name=version::${playwright_version}" - - - name: 🤖 Cache Playwright binaries - uses: actions/cache@v3 - id: playwright-cache - with: - path: ${{ matrix.playwright_binary_path }} - key: ${{ runner.os }}-${{ runner.arch }}-cache-playwright-${{ steps.playwright-version.outputs.version }} - - - name: 🖨️ Playwright info - shell: bash - run: | - echo "OS: ${{ matrix.os }}" - echo "Playwright version: ${{ steps.playwright-version.outputs.version }}" - echo "Playwright install dir: ${{ matrix.playwright_binary_path }}" - echo "Cache key: ${{ runner.os }}-${{ runner.arch }}-cache-playwright-${{ steps.playwright-version.outputs.version }}" - echo "Cache hit: ${{ steps.playwright-cache.outputs.cache-hit == 'true' }}" - - name: 📥 Install Playwright - if: steps.playwright-cache.outputs.cache-hit != 'true' run: npx playwright install --with-deps - - name: 👀 Run Integration Tests - run: "yarn test:integration" + - name: 👀 Run Integration Tests ${{ matrix.browser }} + run: "yarn test:integration --project=${{ matrix.browser }}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e0551fc7955..29861815e6c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,6 +17,6 @@ on: jobs: test: if: github.repository == 'remix-run/remix' - uses: remix-run/remix/.github/workflows/reusable-test.yml@main + uses: ./.github/workflows/reusable-test.yml with: node_version: '["latest"]' diff --git a/integration/form-test.ts b/integration/form-test.ts index 251abe0e6ad..ea616bc4361 100644 --- a/integration/form-test.ts +++ b/integration/form-test.ts @@ -785,13 +785,21 @@ test.describe("Forms", () => { test("
submits the submitter's value appended to the form data", async ({ page, + browserName, }) => { let app = new PlaywrightFixture(appFixture, page); await app.goto("/submitter"); await app.clickElement("text=Add Task"); await page.waitForLoadState("load"); - expect(await app.getHtml("pre")).toBe( - `
tasks=first&tasks=second&tasks=
` - ); + // TODO: remove after playwright ships safari 16 + if (browserName === "webkit") { + expect(await app.getHtml("pre")).toBe( + `
tasks=first&tasks=second&tasks=&tasks=
` + ); + } else { + expect(await app.getHtml("pre")).toBe( + `
tasks=first&tasks=second&tasks=
` + ); + } }); }); diff --git a/integration/playwright.config.ts b/integration/playwright.config.ts index 0e125404ff0..54fff7e73b7 100644 --- a/integration/playwright.config.ts +++ b/integration/playwright.config.ts @@ -23,6 +23,12 @@ const config: PlaywrightTestConfig = { ...devices["Desktop Chrome"], }, }, + { + name: "webkit", + use: { + ...devices["Desktop Safari"], + }, + }, ], }; From cf1f2d813fc85222ee43b6c0c7cd1695354e286d Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Wed, 24 Aug 2022 12:16:14 -0400 Subject: [PATCH 02/29] chore(deps): bump esbuild to latest, remove shim (#3860) Co-authored-by: Kent C. Dodds --- .changeset/gold-mice-pretend.md | 10 + packages/remix-dev/compiler.ts | 11 +- packages/remix-dev/compiler/shims/react.ts | 3 - packages/remix-dev/package.json | 2 +- yarn.lock | 208 +++++++++++---------- 5 files changed, 122 insertions(+), 112 deletions(-) create mode 100644 .changeset/gold-mice-pretend.md delete mode 100644 packages/remix-dev/compiler/shims/react.ts diff --git a/.changeset/gold-mice-pretend.md b/.changeset/gold-mice-pretend.md new file mode 100644 index 00000000000..54418ea6a09 --- /dev/null +++ b/.changeset/gold-mice-pretend.md @@ -0,0 +1,10 @@ +--- +"remix": patch +"@remix-run/dev": patch +--- + +use esbuild's new automatic jsx transform + +there are no code changes from your end, but by using the new transform, we can prevent duplicate React imports from appearing in your build (#2987) + +the automatic jsx transform was introduced in React 17 and allows you to write your React code without ever needing to import React to just write jsx, if you used `useState` or other hooks, you still needed it. However up until now, esbuild didnt support this and instead recommended you to use a "shim" to add `import React from 'react'` to your files to get the same affect. This unfortantely has caused some pain points with some external libraries resulting in React being declared multiple times, but no more! (Chance said so himself, so... go tell him if it's busted) diff --git a/packages/remix-dev/compiler.ts b/packages/remix-dev/compiler.ts index caf56acf16b..a2425c7ca82 100644 --- a/packages/remix-dev/compiler.ts +++ b/packages/remix-dev/compiler.ts @@ -26,11 +26,6 @@ import { serverRouteModulesPlugin } from "./compiler/plugins/serverRouteModulesP import { writeFileSafe } from "./compiler/utils/fs"; import { urlImportsPlugin } from "./compiler/plugins/urlImportsPlugin"; -// When we build Remix, this shim file is copied directly into the output -// directory in the same place relative to this file. It is eventually injected -// as a source file when building the app. -const reactShim = path.resolve(__dirname, "compiler/shims/react.ts"); - interface BuildConfig { mode: BuildMode; target: BuildTarget; @@ -366,7 +361,6 @@ async function createBrowserBuild( platform: "browser", format: "esm", external: externals, - inject: config.serverBuildTarget === "deno" ? [] : [reactShim], loader: loaders, bundle: true, logLevel: "silent", @@ -387,6 +381,8 @@ async function createBrowserBuild( config.devServerPort ), }, + jsx: "automatic", + jsxDev: options.mode !== BuildMode.Production, plugins, }); } @@ -459,7 +455,6 @@ function createServerBuild( ? ["module", "main"] : ["main", "module"], target: options.target, - inject: config.serverBuildTarget === "deno" ? [] : [reactShim], loader: loaders, bundle: true, logLevel: "silent", @@ -475,6 +470,8 @@ function createServerBuild( config.devServerPort ), }, + jsx: "automatic", + jsxDev: options.mode !== BuildMode.Production, plugins, }) .then(async (build) => { diff --git a/packages/remix-dev/compiler/shims/react.ts b/packages/remix-dev/compiler/shims/react.ts deleted file mode 100644 index 44af7fb1b97..00000000000 --- a/packages/remix-dev/compiler/shims/react.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import/no-extraneous-dependencies -import * as React from "react"; -export { React }; diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index 223c63508e5..3c61d22eb59 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -31,7 +31,7 @@ "chalk": "^4.1.2", "chokidar": "^3.5.1", "dotenv": "^16.0.0", - "esbuild": "0.14.22", + "esbuild": "0.14.51", "exit-hook": "2.2.1", "express": "^4.17.1", "fast-glob": "3.2.11", diff --git a/yarn.lock b/yarn.lock index fd112c3ee6f..d4f39431903 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5416,225 +5416,205 @@ esbuild-android-64@0.14.47: resolved "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.47.tgz#ef95b42c67bcf4268c869153fa3ad1466c4cea6b" integrity sha512-R13Bd9+tqLVFndncMHssZrPWe6/0Kpv2/dt4aA69soX4PRxlzsVpCvoJeFE8sOEoeVEiBkI0myjlkDodXlHa0g== -esbuild-android-arm64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.22.tgz" - integrity sha512-k1Uu4uC4UOFgrnTj2zuj75EswFSEBK+H6lT70/DdS4mTAOfs2ECv2I9ZYvr3w0WL0T4YItzJdK7fPNxcPw6YmQ== +esbuild-android-64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.51.tgz#414a087cb0de8db1e347ecca6c8320513de433db" + integrity sha512-6FOuKTHnC86dtrKDmdSj2CkcKF8PnqkaIXqvgydqfJmqBazCPdw+relrMlhGjkvVdiiGV70rpdnyFmA65ekBCQ== esbuild-android-arm64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.47.tgz#4ebd7ce9fb250b4695faa3ee46fd3b0754ecd9e6" integrity sha512-OkwOjj7ts4lBp/TL6hdd8HftIzOy/pdtbrNA4+0oVWgGG64HrdVzAF5gxtJufAPOsEjkyh1oIYvKAUinKKQRSQ== -esbuild-darwin-64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.22.tgz" - integrity sha512-d8Ceuo6Vw6HM3fW218FB6jTY6O3r2WNcTAU0SGsBkXZ3k8SDoRLd3Nrc//EqzdgYnzDNMNtrWegK2Qsss4THhw== +esbuild-android-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.51.tgz#55de3bce2aab72bcd2b606da4318ad00fb9c8151" + integrity sha512-vBtp//5VVkZWmYYvHsqBRCMMi1MzKuMIn5XDScmnykMTu9+TD9v0NMEDqQxvtFToeYmojdo5UCV2vzMQWJcJ4A== esbuild-darwin-64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.47.tgz#e0da6c244f497192f951807f003f6a423ed23188" integrity sha512-R6oaW0y5/u6Eccti/TS6c/2c1xYTb1izwK3gajJwi4vIfNs1s8B1dQzI1UiC9T61YovOQVuePDcfqHLT3mUZJA== -esbuild-darwin-arm64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.22.tgz" - integrity sha512-YAt9Tj3SkIUkswuzHxkaNlT9+sg0xvzDvE75LlBo4DI++ogSgSmKNR6B4eUhU5EUUepVXcXdRIdqMq9ppeRqfw== +esbuild-darwin-64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.51.tgz#4259f23ed6b4cea2ec8a28d87b7fb9801f093754" + integrity sha512-YFmXPIOvuagDcwCejMRtCDjgPfnDu+bNeh5FU2Ryi68ADDVlWEpbtpAbrtf/lvFTWPexbgyKgzppNgsmLPr8PA== esbuild-darwin-arm64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.47.tgz#cd40fd49a672fca581ed202834239dfe540a9028" integrity sha512-seCmearlQyvdvM/noz1L9+qblC5vcBrhUaOoLEDDoLInF/VQ9IkobGiLlyTPYP5dW1YD4LXhtBgOyevoIHGGnw== -esbuild-freebsd-64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.22.tgz" - integrity sha512-ek1HUv7fkXMy87Qm2G4IRohN+Qux4IcnrDBPZGXNN33KAL0pEJJzdTv0hB/42+DCYWylSrSKxk3KUXfqXOoH4A== +esbuild-darwin-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.51.tgz#d77b4366a71d84e530ba019d540b538b295d494a" + integrity sha512-juYD0QnSKwAMfzwKdIF6YbueXzS6N7y4GXPDeDkApz/1RzlT42mvX9jgNmyOlWKN7YzQAYbcUEJmZJYQGdf2ow== esbuild-freebsd-64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.47.tgz#8da6a14c095b29c01fc8087a16cb7906debc2d67" integrity sha512-ZH8K2Q8/Ux5kXXvQMDsJcxvkIwut69KVrYQhza/ptkW50DC089bCVrJZZ3sKzIoOx+YPTrmsZvqeZERjyYrlvQ== -esbuild-freebsd-arm64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.22.tgz" - integrity sha512-zPh9SzjRvr9FwsouNYTqgqFlsMIW07O8mNXulGeQx6O5ApgGUBZBgtzSlBQXkHi18WjrosYfsvp5nzOKiWzkjQ== +esbuild-freebsd-64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.51.tgz#27b6587b3639f10519c65e07219d249b01f2ad38" + integrity sha512-cLEI/aXjb6vo5O2Y8rvVSQ7smgLldwYY5xMxqh/dQGfWO+R1NJOFsiax3IS4Ng300SVp7Gz3czxT6d6qf2cw0g== esbuild-freebsd-arm64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.47.tgz#ad31f9c92817ff8f33fd253af7ab5122dc1b83f6" integrity sha512-ZJMQAJQsIOhn3XTm7MPQfCzEu5b9STNC+s90zMWe2afy9EwnHV7Ov7ohEMv2lyWlc2pjqLW8QJnz2r0KZmeAEQ== -esbuild-linux-32@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.22.tgz" - integrity sha512-SnpveoE4nzjb9t2hqCIzzTWBM0RzcCINDMBB67H6OXIuDa4KqFqaIgmTchNA9pJKOVLVIKd5FYxNiJStli21qg== +esbuild-freebsd-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.51.tgz#63c435917e566808c71fafddc600aca4d78be1ec" + integrity sha512-TcWVw/rCL2F+jUgRkgLa3qltd5gzKjIMGhkVybkjk6PJadYInPtgtUBp1/hG+mxyigaT7ib+od1Xb84b+L+1Mg== esbuild-linux-32@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.47.tgz#de085e4db2e692ea30c71208ccc23fdcf5196c58" integrity sha512-FxZOCKoEDPRYvq300lsWCTv1kcHgiiZfNrPtEhFAiqD7QZaXrad8LxyJ8fXGcWzIFzRiYZVtB3ttvITBvAFhKw== -esbuild-linux-64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.22.tgz" - integrity sha512-Zcl9Wg7gKhOWWNqAjygyqzB+fJa19glgl2JG7GtuxHyL1uEnWlpSMytTLMqtfbmRykIHdab797IOZeKwk5g0zg== +esbuild-linux-32@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.51.tgz#c3da774143a37e7f11559b9369d98f11f997a5d9" + integrity sha512-RFqpyC5ChyWrjx8Xj2K0EC1aN0A37H6OJfmUXIASEqJoHcntuV3j2Efr9RNmUhMfNE6yEj2VpYuDteZLGDMr0w== esbuild-linux-64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.47.tgz#2a9321bbccb01f01b04cebfcfccbabeba3658ba1" integrity sha512-nFNOk9vWVfvWYF9YNYksZptgQAdstnDCMtR6m42l5Wfugbzu11VpMCY9XrD4yFxvPo9zmzcoUL/88y0lfJZJJw== -esbuild-linux-arm64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.22.tgz" - integrity sha512-8q/FRBJtV5IHnQChO3LHh/Jf7KLrxJ/RCTGdBvlVZhBde+dk3/qS9fFsUy+rs3dEi49aAsyVitTwlKw1SUFm+A== +esbuild-linux-64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.51.tgz#5d92b67f674e02ae0b4a9de9a757ba482115c4ae" + integrity sha512-dxjhrqo5i7Rq6DXwz5v+MEHVs9VNFItJmHBe1CxROWNf4miOGoQhqSG8StStbDkQ1Mtobg6ng+4fwByOhoQoeA== esbuild-linux-arm64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.47.tgz#b9da7b6fc4b0ca7a13363a0c5b7bb927e4bc535a" integrity sha512-ywfme6HVrhWcevzmsufjd4iT3PxTfCX9HOdxA7Hd+/ZM23Y9nXeb+vG6AyA6jgq/JovkcqRHcL9XwRNpWG6XRw== -esbuild-linux-arm@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.22.tgz" - integrity sha512-soPDdbpt/C0XvOOK45p4EFt8HbH5g+0uHs5nUKjHVExfgR7du734kEkXR/mE5zmjrlymk5AA79I0VIvj90WZ4g== +esbuild-linux-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.51.tgz#dac84740516e859d8b14e1ecc478dd5241b10c93" + integrity sha512-D9rFxGutoqQX3xJPxqd6o+kvYKeIbM0ifW2y0bgKk5HPgQQOo2k9/2Vpto3ybGYaFPCE5qTGtqQta9PoP6ZEzw== esbuild-linux-arm@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.47.tgz#56fec2a09b9561c337059d4af53625142aded853" integrity sha512-ZGE1Bqg/gPRXrBpgpvH81tQHpiaGxa8c9Rx/XOylkIl2ypLuOcawXEAo8ls+5DFCcRGt/o3sV+PzpAFZobOsmA== -esbuild-linux-mips64le@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.22.tgz" - integrity sha512-SiNDfuRXhGh1JQLLA9JPprBgPVFOsGuQ0yDfSPTNxztmVJd8W2mX++c4FfLpAwxuJe183mLuKf7qKCHQs5ZnBQ== +esbuild-linux-arm@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.51.tgz#b3ae7000696cd53ed95b2b458554ff543a60e106" + integrity sha512-LsJynDxYF6Neg7ZC7748yweCDD+N8ByCv22/7IAZglIEniEkqdF4HCaa49JNDLw1UQGlYuhOB8ZT/MmcSWzcWg== esbuild-linux-mips64le@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.47.tgz#9db21561f8f22ed79ef2aedb7bbef082b46cf823" integrity sha512-mg3D8YndZ1LvUiEdDYR3OsmeyAew4MA/dvaEJxvyygahWmpv1SlEEnhEZlhPokjsUMfRagzsEF/d/2XF+kTQGg== -esbuild-linux-ppc64le@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.22.tgz" - integrity sha512-6t/GI9I+3o1EFm2AyN9+TsjdgWCpg2nwniEhjm2qJWtJyJ5VzTXGUU3alCO3evopu8G0hN2Bu1Jhz2YmZD0kng== +esbuild-linux-mips64le@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.51.tgz#dad10770fac94efa092b5a0643821c955a9dd385" + integrity sha512-vS54wQjy4IinLSlb5EIlLoln8buh1yDgliP4CuEHumrPk4PvvP4kTRIG4SzMXm6t19N0rIfT4bNdAxzJLg2k6A== esbuild-linux-ppc64le@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.47.tgz#dc3a3da321222b11e96e50efafec9d2de408198b" integrity sha512-WER+f3+szmnZiWoK6AsrTKGoJoErG2LlauSmk73LEZFQ/iWC+KhhDsOkn1xBUpzXWsxN9THmQFltLoaFEH8F8w== -esbuild-linux-riscv64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.22.tgz" - integrity sha512-AyJHipZKe88sc+tp5layovquw5cvz45QXw5SaDgAq2M911wLHiCvDtf/07oDx8eweCyzYzG5Y39Ih568amMTCQ== +esbuild-linux-ppc64le@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.51.tgz#b68c2f8294d012a16a88073d67e976edd4850ae0" + integrity sha512-xcdd62Y3VfGoyphNP/aIV9LP+RzFw5M5Z7ja+zdpQHHvokJM7d0rlDRMN+iSSwvUymQkqZO+G/xjb4/75du8BQ== esbuild-linux-riscv64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.47.tgz#9bd6dcd3dca6c0357084ecd06e1d2d4bf105335f" integrity sha512-1fI6bP3A3rvI9BsaaXbMoaOjLE3lVkJtLxsgLHqlBhLlBVY7UqffWBvkrX/9zfPhhVMd9ZRFiaqXnB1T7BsL2g== -esbuild-linux-s390x@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.22.tgz" - integrity sha512-Sz1NjZewTIXSblQDZWEFZYjOK6p8tV6hrshYdXZ0NHTjWE+lwxpOpWeElUGtEmiPcMT71FiuA9ODplqzzSxkzw== +esbuild-linux-riscv64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.51.tgz#608a318b8697123e44c1e185cdf6708e3df50b93" + integrity sha512-syXHGak9wkAnFz0gMmRBoy44JV0rp4kVCEA36P5MCeZcxFq8+fllBC2t6sKI23w3qd8Vwo9pTADCgjTSf3L3rA== esbuild-linux-s390x@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.47.tgz#a458af939b52f2cd32fc561410d441a51f69d41f" integrity sha512-eZrWzy0xFAhki1CWRGnhsHVz7IlSKX6yT2tj2Eg8lhAwlRE5E96Hsb0M1mPSE1dHGpt1QVwwVivXIAacF/G6mw== -esbuild-netbsd-64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.22.tgz" - integrity sha512-TBbCtx+k32xydImsHxvFgsOCuFqCTGIxhzRNbgSL1Z2CKhzxwT92kQMhxort9N/fZM2CkRCPPs5wzQSamtzEHA== +esbuild-linux-s390x@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.51.tgz#c9e7791170a3295dba79b93aa452beb9838a8625" + integrity sha512-kFAJY3dv+Wq8o28K/C7xkZk/X34rgTwhknSsElIqoEo8armCOjMJ6NsMxm48KaWY2h2RUYGtQmr+RGuUPKBhyw== esbuild-netbsd-64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.47.tgz#6388e785d7e7e4420cb01348d7483ab511b16aa8" integrity sha512-Qjdjr+KQQVH5Q2Q1r6HBYswFTToPpss3gqCiSw2Fpq/ua8+eXSQyAMG+UvULPqXceOwpnPo4smyZyHdlkcPppQ== -esbuild-openbsd-64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.22.tgz" - integrity sha512-vK912As725haT313ANZZZN+0EysEEQXWC/+YE4rQvOQzLuxAQc2tjbzlAFREx3C8+uMuZj/q7E5gyVB7TzpcTA== +esbuild-netbsd-64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.51.tgz#0abd40b8c2e37fda6f5cc41a04cb2b690823d891" + integrity sha512-ZZBI7qrR1FevdPBVHz/1GSk1x5GDL/iy42Zy8+neEm/HA7ma+hH/bwPEjeHXKWUDvM36CZpSL/fn1/y9/Hb+1A== esbuild-openbsd-64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.47.tgz#309af806db561aa886c445344d1aacab850dbdc5" integrity sha512-QpgN8ofL7B9z8g5zZqJE+eFvD1LehRlxr25PBkjyyasakm4599iroUpaj96rdqRlO2ShuyqwJdr+oNqWwTUmQw== +esbuild-openbsd-64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.51.tgz#4adba0b7ea7eb1428bb00d8e94c199a949b130e8" + integrity sha512-7R1/p39M+LSVQVgDVlcY1KKm6kFKjERSX1lipMG51NPcspJD1tmiZSmmBXoY5jhHIu6JL1QkFDTx94gMYK6vfA== + esbuild-register@^3.3.2: version "3.3.2" resolved "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.3.2.tgz" integrity sha512-jceAtTO6zxPmCfSD5cBb3rgIK1vmuqCKYwgylHiS1BF4pq0jJiJb4K2QMuqF4BEw7XDBRatYzip0upyTzfkgsQ== -esbuild-sunos-64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.22.tgz" - integrity sha512-/mbJdXTW7MTcsPhtfDsDyPEOju9EOABvCjeUU2OJ7fWpX/Em/H3WYDa86tzLUbcVg++BScQDzqV/7RYw5XNY0g== - esbuild-sunos-64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.47.tgz#3f19612dcdb89ba6c65283a7ff6e16f8afbf8aaa" integrity sha512-uOeSgLUwukLioAJOiGYm3kNl+1wJjgJA8R671GYgcPgCx7QR73zfvYqXFFcIO93/nBdIbt5hd8RItqbbf3HtAQ== -esbuild-windows-32@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.22.tgz" - integrity sha512-1vRIkuvPTjeSVK3diVrnMLSbkuE36jxA+8zGLUOrT4bb7E/JZvDRhvtbWXWaveUc/7LbhaNFhHNvfPuSw2QOQg== +esbuild-sunos-64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.51.tgz#4b8a6d97dfedda30a6e39607393c5c90ebf63891" + integrity sha512-HoHaCswHxLEYN8eBTtyO0bFEWvA3Kdb++hSQ/lLG7TyKF69TeSG0RNoBRAs45x/oCeWaTDntEZlYwAfQlhEtJA== esbuild-windows-32@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.47.tgz#a92d279c8458d5dc319abcfeb30aa49e8f2e6f7f" integrity sha512-H0fWsLTp2WBfKLBgwYT4OTfFly4Im/8B5f3ojDv1Kx//kiubVY0IQunP2Koc/fr/0wI7hj3IiBDbSrmKlrNgLQ== -esbuild-windows-64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.22.tgz" - integrity sha512-AxjIDcOmx17vr31C5hp20HIwz1MymtMjKqX4qL6whPj0dT9lwxPexmLj6G1CpR3vFhui6m75EnBEe4QL82SYqw== +esbuild-windows-32@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.51.tgz#d31d8ca0c1d314fb1edea163685a423b62e9ac17" + integrity sha512-4rtwSAM35A07CBt1/X8RWieDj3ZUHQqUOaEo5ZBs69rt5WAFjP4aqCIobdqOy4FdhYw1yF8Z0xFBTyc9lgPtEg== esbuild-windows-64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.47.tgz#2564c3fcf0c23d701edb71af8c52d3be4cec5f8a" integrity sha512-/Pk5jIEH34T68r8PweKRi77W49KwanZ8X6lr3vDAtOlH5EumPE4pBHqkCUdELanvsT14yMXLQ/C/8XPi1pAtkQ== -esbuild-windows-arm64@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.22.tgz" - integrity sha512-5wvQ+39tHmRhNpu2Fx04l7QfeK3mQ9tKzDqqGR8n/4WUxsFxnVLfDRBGirIfk4AfWlxk60kqirlODPoT5LqMUg== +esbuild-windows-64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.51.tgz#7d3c09c8652d222925625637bdc7e6c223e0085d" + integrity sha512-HoN/5HGRXJpWODprGCgKbdMvrC3A2gqvzewu2eECRw2sYxOUoh2TV1tS+G7bHNapPGI79woQJGV6pFH7GH7qnA== esbuild-windows-arm64@0.14.47: version "0.14.47" resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.47.tgz#86d9db1a22d83360f726ac5fba41c2f625db6878" integrity sha512-HFSW2lnp62fl86/qPQlqw6asIwCnEsEoNIL1h2uVMgakddf+vUuMcCbtUY1i8sst7KkgHrVKCJQB33YhhOweCQ== -esbuild@0.14.22: - version "0.14.22" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.22.tgz" - integrity sha512-CjFCFGgYtbFOPrwZNJf7wsuzesx8kqwAffOlbYcFDLFuUtP8xloK1GH+Ai13Qr0RZQf9tE7LMTHJ2iVGJ1SKZA== - optionalDependencies: - esbuild-android-arm64 "0.14.22" - esbuild-darwin-64 "0.14.22" - esbuild-darwin-arm64 "0.14.22" - esbuild-freebsd-64 "0.14.22" - esbuild-freebsd-arm64 "0.14.22" - esbuild-linux-32 "0.14.22" - esbuild-linux-64 "0.14.22" - esbuild-linux-arm "0.14.22" - esbuild-linux-arm64 "0.14.22" - esbuild-linux-mips64le "0.14.22" - esbuild-linux-ppc64le "0.14.22" - esbuild-linux-riscv64 "0.14.22" - esbuild-linux-s390x "0.14.22" - esbuild-netbsd-64 "0.14.22" - esbuild-openbsd-64 "0.14.22" - esbuild-sunos-64 "0.14.22" - esbuild-windows-32 "0.14.22" - esbuild-windows-64 "0.14.22" - esbuild-windows-arm64 "0.14.22" +esbuild-windows-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.51.tgz#0220d2304bfdc11bc27e19b2aaf56edf183e4ae9" + integrity sha512-JQDqPjuOH7o+BsKMSddMfmVJXrnYZxXDHsoLHc0xgmAZkOOCflRmC43q31pk79F9xuyWY45jDBPolb5ZgGOf9g== esbuild@0.14.47: version "0.14.47" @@ -5662,6 +5642,32 @@ esbuild@0.14.47: esbuild-windows-64 "0.14.47" esbuild-windows-arm64 "0.14.47" +esbuild@0.14.51: + version "0.14.51" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.51.tgz#1c8ecbc8db3710da03776211dc3ee3448f7aa51e" + integrity sha512-+CvnDitD7Q5sT7F+FM65sWkF8wJRf+j9fPcprxYV4j+ohmzVj2W7caUqH2s5kCaCJAfcAICjSlKhDCcvDpU7nw== + optionalDependencies: + esbuild-android-64 "0.14.51" + esbuild-android-arm64 "0.14.51" + esbuild-darwin-64 "0.14.51" + esbuild-darwin-arm64 "0.14.51" + esbuild-freebsd-64 "0.14.51" + esbuild-freebsd-arm64 "0.14.51" + esbuild-linux-32 "0.14.51" + esbuild-linux-64 "0.14.51" + esbuild-linux-arm "0.14.51" + esbuild-linux-arm64 "0.14.51" + esbuild-linux-mips64le "0.14.51" + esbuild-linux-ppc64le "0.14.51" + esbuild-linux-riscv64 "0.14.51" + esbuild-linux-s390x "0.14.51" + esbuild-netbsd-64 "0.14.51" + esbuild-openbsd-64 "0.14.51" + esbuild-sunos-64 "0.14.51" + esbuild-windows-32 "0.14.51" + esbuild-windows-64 "0.14.51" + esbuild-windows-arm64 "0.14.51" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" From ed6211a6b599bd84e1656de649d6be678f18dad4 Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Wed, 24 Aug 2022 14:05:54 -0700 Subject: [PATCH 03/29] chore: update changesets --- .changeset/config.json | 22 +++++++++++++- .changeset/four-numbers-end.md | 2 +- .changeset/four-poets-stare.md | 2 +- .changeset/gold-mice-pretend.md | 6 +--- .changeset/green-crabs-join.md | 2 +- .changeset/neat-beds-unite.md | 13 ++------ .changeset/nice-fake-duck.md | 5 ---- .changeset/red-apples-stew.md | 2 +- .changeset/stupid-houses-sing.md | 51 +------------------------------- .changeset/thirty-pots-lay.md | 5 ---- .changeset/wild-meals-beg.md | 2 +- .changeset/wordle-is-weird.md | 2 +- 12 files changed, 31 insertions(+), 83 deletions(-) delete mode 100644 .changeset/nice-fake-duck.md delete mode 100644 .changeset/thirty-pots-lay.md diff --git a/.changeset/config.json b/.changeset/config.json index 823547ba4b6..000652b3c6f 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -23,7 +23,27 @@ "@remix-run/vercel" ] ], - "linked": [], + "linked": [ + [ + "create-remix", + "remix", + "@remix-run/dev", + "@remix-run/eslint-config", + "@remix-run/react", + "@remix-run/serve", + + "@remix-run/server-runtime", + "@remix-run/cloudflare", + "@remix-run/node", + + "@remix-run/deno", + "@remix-run/cloudflare-pages", + "@remix-run/cloudflare-workers", + "@remix-run/express", + "@remix-run/netlify", + "@remix-run/vercel" + ] + ], "access": "public", "baseBranch": "dev", "updateInternalDependencies": "patch", diff --git a/.changeset/four-numbers-end.md b/.changeset/four-numbers-end.md index 58d56d27bd7..656ca11a227 100644 --- a/.changeset/four-numbers-end.md +++ b/.changeset/four-numbers-end.md @@ -2,4 +2,4 @@ "@remix-run/server-runtime": patch --- -Improve performance when serializing data in the server runtime. +Improved performance for data serialization at runtime diff --git a/.changeset/four-poets-stare.md b/.changeset/four-poets-stare.md index e1d6a894ff7..87c9541eb73 100644 --- a/.changeset/four-poets-stare.md +++ b/.changeset/four-poets-stare.md @@ -2,4 +2,4 @@ "@remix-run/dev": minor --- -feat(remix-dev): import `.gql` & `.graphql` files as text +Added support for importing `.gql` and `.graphql` files as plain text diff --git a/.changeset/gold-mice-pretend.md b/.changeset/gold-mice-pretend.md index 54418ea6a09..9bb2fa36182 100644 --- a/.changeset/gold-mice-pretend.md +++ b/.changeset/gold-mice-pretend.md @@ -3,8 +3,4 @@ "@remix-run/dev": patch --- -use esbuild's new automatic jsx transform - -there are no code changes from your end, but by using the new transform, we can prevent duplicate React imports from appearing in your build (#2987) - -the automatic jsx transform was introduced in React 17 and allows you to write your React code without ever needing to import React to just write jsx, if you used `useState` or other hooks, you still needed it. However up until now, esbuild didnt support this and instead recommended you to use a "shim" to add `import React from 'react'` to your files to get the same affect. This unfortantely has caused some pain points with some external libraries resulting in React being declared multiple times, but no more! (Chance said so himself, so... go tell him if it's busted) +Removed our compiler's React shim in favor of esbuild's new automatic JSX transform diff --git a/.changeset/green-crabs-join.md b/.changeset/green-crabs-join.md index 965f0458748..bd151f06313 100644 --- a/.changeset/green-crabs-join.md +++ b/.changeset/green-crabs-join.md @@ -2,4 +2,4 @@ "@remix-run/dev": minor --- -Added support for importing `.zip` files +Added support for importing `.zip` and `.avif` files as resource URLs diff --git a/.changeset/neat-beds-unite.md b/.changeset/neat-beds-unite.md index 129f4e7425a..56e03ea796d 100644 --- a/.changeset/neat-beds-unite.md +++ b/.changeset/neat-beds-unite.md @@ -8,14 +8,5 @@ "@remix-run/server-runtime": minor --- -Each runtime package (@remix-run/cloudflare,@remix-run/deno,@remix-run/node) now exports `SerializeFrom`, which is used to -infer the JSON-serialized return type of loaders and actions. - -Example: - -```ts -type MyLoaderData = SerializeFrom; -type MyActionData = SerializeFrom; -``` - -This is what `useLoaderData` and `useActionData` use under-the-hood. +We've added a new type: `SerializeFrom`. This is used to infer the +JSON-serialized return type of loaders and actions. diff --git a/.changeset/nice-fake-duck.md b/.changeset/nice-fake-duck.md deleted file mode 100644 index 36289b3f18f..00000000000 --- a/.changeset/nice-fake-duck.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/dev": patch ---- - -Add support for importing avif and zip files diff --git a/.changeset/red-apples-stew.md b/.changeset/red-apples-stew.md index a66ce5561da..1e8c25494ea 100644 --- a/.changeset/red-apples-stew.md +++ b/.changeset/red-apples-stew.md @@ -2,4 +2,4 @@ "@remix-run/dev": patch --- -Fix import -> require conversion of the convert-to-js migration +Fixed a bug in the `import` to `require` conversion in the CLI's `.ts` to `.js` migration script diff --git a/.changeset/stupid-houses-sing.md b/.changeset/stupid-houses-sing.md index b685e1072ae..8eae52c0c30 100644 --- a/.changeset/stupid-houses-sing.md +++ b/.changeset/stupid-houses-sing.md @@ -4,53 +4,4 @@ "@remix-run/server-runtime": minor --- -`MetaFunction` type can now infer `data` and `parentsData` types from loaders - -For example, if this meta function is for `/sales/customers/$customerId`: - -```ts -// app/root.tsx -const loader = () => { - return json({ hello: "world" } as const); -}; -export type Loader = typeof loader; - -// app/routes/sales.tsx -const loader = () => { - return json({ salesCount: 1074 }); -}; -export type Loader = typeof loader; - -// app/routes/sales/customers.tsx -const loader = () => { - return json({ customerCount: 74 }); -}; -export type Loader = typeof loader; - -// app/routes/sales/customers/$customersId.tsx -import type { Loader as RootLoader } from "../../../root"; -import type { Loader as SalesLoader } from "../../sales"; -import type { Loader as CustomersLoader } from "../../sales/customers"; - -const loader = () => { - return json({ name: "Customer name" }); -}; - -const meta: MetaFunction< - typeof loader, - { - root: RootLoader; - "routes/sales": SalesLoader; - "routes/sales/customers": CustomersLoader; - } -> = ({ data, parentsData }) => { - const { name } = data; - // ^? string - const { customerCount } = parentsData["routes/sales/customers"]; - // ^? number - const { salesCount } = parentsData["routes/sales"]; - // ^? number - const { hello } = parentsData["root"]; - // ^? "world" -}; -``` +`MetaFunction` type can now infer `data` and `parentsData` types from route loaders diff --git a/.changeset/thirty-pots-lay.md b/.changeset/thirty-pots-lay.md deleted file mode 100644 index e5cbade3ba4..00000000000 --- a/.changeset/thirty-pots-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/server-runtime": patch ---- - -Make the loadContext parameter not optional so that augmenting AppLoadContext does not require checking if the context is undefined diff --git a/.changeset/wild-meals-beg.md b/.changeset/wild-meals-beg.md index 241e4aad984..f0fd443c49d 100644 --- a/.changeset/wild-meals-beg.md +++ b/.changeset/wild-meals-beg.md @@ -2,4 +2,4 @@ "@remix-run/react": patch --- -Unblock hydration via use of async module scripts. +Unblock hydration via async module scripts. diff --git a/.changeset/wordle-is-weird.md b/.changeset/wordle-is-weird.md index 9084a3e4375..68b8a95bb18 100644 --- a/.changeset/wordle-is-weird.md +++ b/.changeset/wordle-is-weird.md @@ -2,4 +2,4 @@ "@remix-run/node": patch --- -Fix fileStorage session delete so it doesn't destroy the entire session directory when destroying an empty file session. +Fixed a bug when destroying `fileStorage` sessions to prevent deleting entire session directories From ea57b48536f6a015e5d0c046467ec101db53d89b Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Wed, 24 Aug 2022 14:06:33 -0700 Subject: [PATCH 04/29] enter pre-release --- .changeset/pre.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .changeset/pre.json diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000000..b685b93ea14 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,23 @@ +{ + "mode": "pre", + "tag": "pre", + "initialVersions": { + "create-remix": "1.6.8", + "remix": "1.6.8", + "@remix-run/architect": "1.6.8", + "@remix-run/cloudflare": "1.6.8", + "@remix-run/cloudflare-pages": "1.6.8", + "@remix-run/cloudflare-workers": "1.6.8", + "@remix-run/deno": "1.6.8", + "@remix-run/dev": "1.6.8", + "@remix-run/eslint-config": "1.6.8", + "@remix-run/express": "1.6.8", + "@remix-run/netlify": "1.6.8", + "@remix-run/node": "1.6.8", + "@remix-run/react": "1.6.8", + "@remix-run/serve": "1.6.8", + "@remix-run/server-runtime": "1.6.8", + "@remix-run/vercel": "1.6.8" + }, + "changesets": [] +} From b779f0df4fb5a4a4abc7711340c9fbff3e87df79 Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Wed, 24 Aug 2022 14:09:20 -0700 Subject: [PATCH 05/29] chore: revert changeset config --- .changeset/config.json | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index 000652b3c6f..823547ba4b6 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -23,27 +23,7 @@ "@remix-run/vercel" ] ], - "linked": [ - [ - "create-remix", - "remix", - "@remix-run/dev", - "@remix-run/eslint-config", - "@remix-run/react", - "@remix-run/serve", - - "@remix-run/server-runtime", - "@remix-run/cloudflare", - "@remix-run/node", - - "@remix-run/deno", - "@remix-run/cloudflare-pages", - "@remix-run/cloudflare-workers", - "@remix-run/express", - "@remix-run/netlify", - "@remix-run/vercel" - ] - ], + "linked": [], "access": "public", "baseBranch": "dev", "updateInternalDependencies": "patch", From e3c831e4b279ca939884a1ba71179a27e0ca5d5b Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Wed, 24 Aug 2022 14:09:20 -0700 Subject: [PATCH 06/29] chore: revert changeset config --- .changeset/config.json | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index 000652b3c6f..823547ba4b6 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -23,27 +23,7 @@ "@remix-run/vercel" ] ], - "linked": [ - [ - "create-remix", - "remix", - "@remix-run/dev", - "@remix-run/eslint-config", - "@remix-run/react", - "@remix-run/serve", - - "@remix-run/server-runtime", - "@remix-run/cloudflare", - "@remix-run/node", - - "@remix-run/deno", - "@remix-run/cloudflare-pages", - "@remix-run/cloudflare-workers", - "@remix-run/express", - "@remix-run/netlify", - "@remix-run/vercel" - ] - ], + "linked": [], "access": "public", "baseBranch": "dev", "updateInternalDependencies": "patch", From fcb4bbd5512470944e92483128bb007baa15def3 Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Wed, 24 Aug 2022 14:11:10 -0700 Subject: [PATCH 07/29] chore: fix missing linked package --- .changeset/config.json | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index 823547ba4b6..d25053e6606 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -6,20 +6,19 @@ [ "create-remix", "remix", - "@remix-run/dev", - "@remix-run/eslint-config", - "@remix-run/react", - "@remix-run/serve", - - "@remix-run/server-runtime", + "@remix-run/architect", "@remix-run/cloudflare", - "@remix-run/node", - - "@remix-run/deno", "@remix-run/cloudflare-pages", "@remix-run/cloudflare-workers", + "@remix-run/deno", + "@remix-run/dev", + "@remix-run/eslint-config", "@remix-run/express", "@remix-run/netlify", + "@remix-run/node", + "@remix-run/react", + "@remix-run/serve", + "@remix-run/server-runtime", "@remix-run/vercel" ] ], From b428d9546fe2ed83b9baa95e608f9ed3c2ba90c8 Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Wed, 24 Aug 2022 14:11:10 -0700 Subject: [PATCH 08/29] chore: fix missing linked package --- .changeset/config.json | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index 823547ba4b6..d25053e6606 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -6,20 +6,19 @@ [ "create-remix", "remix", - "@remix-run/dev", - "@remix-run/eslint-config", - "@remix-run/react", - "@remix-run/serve", - - "@remix-run/server-runtime", + "@remix-run/architect", "@remix-run/cloudflare", - "@remix-run/node", - - "@remix-run/deno", "@remix-run/cloudflare-pages", "@remix-run/cloudflare-workers", + "@remix-run/deno", + "@remix-run/dev", + "@remix-run/eslint-config", "@remix-run/express", "@remix-run/netlify", + "@remix-run/node", + "@remix-run/react", + "@remix-run/serve", + "@remix-run/server-runtime", "@remix-run/vercel" ] ], From 8c3055acb21a469a62238c1eb32957a59a338807 Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Wed, 24 Aug 2022 14:33:24 -0700 Subject: [PATCH 09/29] chore: Update versions for release --- .changeset/pre.json | 12 +++++++++++- packages/create-remix/CHANGELOG.md | 7 +++++++ packages/create-remix/package.json | 4 ++-- packages/remix-architect/CHANGELOG.md | 7 +++++++ packages/remix-architect/package.json | 4 ++-- packages/remix-cloudflare-pages/CHANGELOG.md | 7 +++++++ packages/remix-cloudflare-pages/package.json | 4 ++-- packages/remix-cloudflare-workers/CHANGELOG.md | 7 +++++++ packages/remix-cloudflare-workers/package.json | 4 ++-- packages/remix-cloudflare/CHANGELOG.md | 12 ++++++++++++ packages/remix-cloudflare/package.json | 4 ++-- packages/remix-deno/CHANGELOG.md | 12 ++++++++++++ packages/remix-deno/package.json | 4 ++-- packages/remix-dev/CHANGELOG.md | 15 +++++++++++++++ packages/remix-dev/package.json | 8 ++++---- packages/remix-eslint-config/CHANGELOG.md | 2 ++ packages/remix-eslint-config/package.json | 2 +- packages/remix-express/CHANGELOG.md | 7 +++++++ packages/remix-express/package.json | 4 ++-- packages/remix-netlify/CHANGELOG.md | 7 +++++++ packages/remix-netlify/package.json | 4 ++-- packages/remix-node/CHANGELOG.md | 13 +++++++++++++ packages/remix-node/package.json | 4 ++-- packages/remix-react/CHANGELOG.md | 11 +++++++++++ packages/remix-react/package.json | 4 ++-- packages/remix-serve/CHANGELOG.md | 13 +++++++++++++ packages/remix-serve/package.json | 4 ++-- packages/remix-server-runtime/CHANGELOG.md | 12 ++++++++++++ packages/remix-server-runtime/package.json | 2 +- packages/remix-vercel/CHANGELOG.md | 7 +++++++ packages/remix-vercel/package.json | 4 ++-- packages/remix/package.json | 2 +- 32 files changed, 181 insertions(+), 32 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index b685b93ea14..0973fc33a61 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -19,5 +19,15 @@ "@remix-run/server-runtime": "1.6.8", "@remix-run/vercel": "1.6.8" }, - "changesets": [] + "changesets": [ + "four-numbers-end", + "four-poets-stare", + "gold-mice-pretend", + "green-crabs-join", + "neat-beds-unite", + "red-apples-stew", + "stupid-houses-sing", + "wild-meals-beg", + "wordle-is-weird" + ] } diff --git a/packages/create-remix/CHANGELOG.md b/packages/create-remix/CHANGELOG.md index 1929c99771c..87f884ec691 100644 --- a/packages/create-remix/CHANGELOG.md +++ b/packages/create-remix/CHANGELOG.md @@ -1,5 +1,12 @@ # `create-remix` +## 1.7.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/dev@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/create-remix/package.json b/packages/create-remix/package.json index 459af74de93..dbdefaa95d0 100644 --- a/packages/create-remix/package.json +++ b/packages/create-remix/package.json @@ -1,6 +1,6 @@ { "name": "create-remix", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Create a new Remix app", "homepage": "https://remix.run", "bugs": { @@ -17,7 +17,7 @@ "create-remix": "dist/cli.js" }, "dependencies": { - "@remix-run/dev": "1.6.8" + "@remix-run/dev": "1.7.0-pre.0" }, "engines": { "node": ">=14" diff --git a/packages/remix-architect/CHANGELOG.md b/packages/remix-architect/CHANGELOG.md index 89ad0b8dadb..f276c5760a8 100644 --- a/packages/remix-architect/CHANGELOG.md +++ b/packages/remix-architect/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/architect` +## 1.7.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-architect/package.json b/packages/remix-architect/package.json index aa4108e77d2..5bee66b713e 100644 --- a/packages/remix-architect/package.json +++ b/packages/remix-architect/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/architect", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Architect server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -15,7 +15,7 @@ "typings": "dist/index.d.ts", "dependencies": { "@architect/functions": "^5.0.2", - "@remix-run/node": "1.6.8", + "@remix-run/node": "1.7.0-pre.0", "@types/aws-lambda": "^8.10.82" }, "devDependencies": { diff --git a/packages/remix-cloudflare-pages/CHANGELOG.md b/packages/remix-cloudflare-pages/CHANGELOG.md index f0014676ef7..43980704e6f 100644 --- a/packages/remix-cloudflare-pages/CHANGELOG.md +++ b/packages/remix-cloudflare-pages/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare-pages` +## 1.7.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-cloudflare-pages/package.json b/packages/remix-cloudflare-pages/package.json index bcc84961cd2..7c886bfc3fe 100644 --- a/packages/remix-cloudflare-pages/package.json +++ b/packages/remix-cloudflare-pages/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare-pages", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Cloudflare Pages request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -15,7 +15,7 @@ "typings": "dist/index.d.ts", "module": "dist/esm/index.js", "dependencies": { - "@remix-run/cloudflare": "1.6.8" + "@remix-run/cloudflare": "1.7.0-pre.0" }, "devDependencies": { "@cloudflare/workers-types": "^3.4.0", diff --git a/packages/remix-cloudflare-workers/CHANGELOG.md b/packages/remix-cloudflare-workers/CHANGELOG.md index 9ee9fc72b13..e7f36b4cb30 100644 --- a/packages/remix-cloudflare-workers/CHANGELOG.md +++ b/packages/remix-cloudflare-workers/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare-workers` +## 1.7.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-cloudflare-workers/package.json b/packages/remix-cloudflare-workers/package.json index 8bc113a5e20..db983e359a6 100644 --- a/packages/remix-cloudflare-workers/package.json +++ b/packages/remix-cloudflare-workers/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare-workers", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Cloudflare worker request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -16,7 +16,7 @@ "module": "dist/esm/index.js", "dependencies": { "@cloudflare/kv-asset-handler": "^0.1.3", - "@remix-run/cloudflare": "1.6.8" + "@remix-run/cloudflare": "1.7.0-pre.0" }, "devDependencies": { "@cloudflare/workers-types": "^3.4.0" diff --git a/packages/remix-cloudflare/CHANGELOG.md b/packages/remix-cloudflare/CHANGELOG.md index 1bbcf89fc09..81e5b3e5a49 100644 --- a/packages/remix-cloudflare/CHANGELOG.md +++ b/packages/remix-cloudflare/CHANGELOG.md @@ -1,5 +1,17 @@ # `@remix-run/cloudflare` +## 1.7.0-pre.0 + +### Minor Changes + +- We've added a new type: `SerializeFrom`. This is used to infer the ([#4013](https://github.com/remix-run/remix/pull/4013)) + JSON-serialized return type of loaders and actions. + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-cloudflare/package.json b/packages/remix-cloudflare/package.json index 16e4508e8e3..954837e01d2 100644 --- a/packages/remix-cloudflare/package.json +++ b/packages/remix-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Cloudflare platform abstractions for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -15,7 +15,7 @@ "typings": "dist/index.d.ts", "dependencies": { "@cloudflare/kv-asset-handler": "^0.1.3", - "@remix-run/server-runtime": "1.6.8" + "@remix-run/server-runtime": "1.7.0-pre.0" }, "devDependencies": { "@cloudflare/workers-types": "^3.4.0" diff --git a/packages/remix-deno/CHANGELOG.md b/packages/remix-deno/CHANGELOG.md index 0402d119ab5..7cab39d6ced 100644 --- a/packages/remix-deno/CHANGELOG.md +++ b/packages/remix-deno/CHANGELOG.md @@ -1,5 +1,17 @@ # `@remix-run/deno` +## 1.7.0-pre.0 + +### Minor Changes + +- We've added a new type: `SerializeFrom`. This is used to infer the ([#4013](https://github.com/remix-run/remix/pull/4013)) + JSON-serialized return type of loaders and actions. + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-deno/package.json b/packages/remix-deno/package.json index 4982aebe31b..6acdcd78eec 100644 --- a/packages/remix-deno/package.json +++ b/packages/remix-deno/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/deno", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Deno platform abstractions for Remix", "homepage": "https://remix.run", "main": "./index.ts", @@ -15,7 +15,7 @@ "license": "MIT", "sideEffects": false, "dependencies": { - "@remix-run/server-runtime": "1.6.8", + "@remix-run/server-runtime": "1.7.0-pre.0", "mime": "^3.0.0" }, "engines": { diff --git a/packages/remix-dev/CHANGELOG.md b/packages/remix-dev/CHANGELOG.md index 1fff7753547..b6e91edc64c 100644 --- a/packages/remix-dev/CHANGELOG.md +++ b/packages/remix-dev/CHANGELOG.md @@ -1,5 +1,20 @@ # `@remix-run/dev` +## 1.7.0-pre.0 + +### Minor Changes + +- Added support for importing `.gql` and `.graphql` files as plain text ([#3923](https://github.com/remix-run/remix/pull/3923)) +- Added support for importing `.zip` and `.avif` files as resource URLs ([#3985](https://github.com/remix-run/remix/pull/3985)) + +### Patch Changes + +- Removed our compiler's React shim in favor of esbuild's new automatic JSX transform ([#3860](https://github.com/remix-run/remix/pull/3860)) +- Fixed a bug in the `import` to `require` conversion in the CLI's `.ts` to `.js` migration script ([#3986](https://github.com/remix-run/remix/pull/3986)) +- Updated dependencies: + - `@remix-run/server-runtime@1.7.0-pre.0` + - `@remix-run/serve@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index 3c61d22eb59..c16cbbca7b8 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/dev", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Dev tools and CLI for Remix", "homepage": "https://remix.run", "bugs": { @@ -24,7 +24,7 @@ "@babel/preset-typescript": "^7.18.6", "@esbuild-plugins/node-modules-polyfill": "^0.1.4", "@npmcli/package-json": "^2.0.0", - "@remix-run/server-runtime": "1.6.8", + "@remix-run/server-runtime": "1.7.0-pre.0", "@yarnpkg/esbuild-plugin-pnp": "3.0.0-rc.11", "arg": "^5.0.1", "cacache": "^15.0.5", @@ -59,7 +59,7 @@ "xdm": "^2.0.0" }, "devDependencies": { - "@remix-run/serve": "1.6.8", + "@remix-run/serve": "1.7.0-pre.0", "@types/cacache": "^15.0.0", "@types/gunzip-maybe": "^1.4.0", "@types/inquirer": "^8.2.0", @@ -78,7 +78,7 @@ "type-fest": "^2.16.0" }, "peerDependencies": { - "@remix-run/serve": "1.6.8" + "@remix-run/serve": "1.7.0-pre.0" }, "peerDependenciesMeta": { "@remix-run/serve": { diff --git a/packages/remix-eslint-config/CHANGELOG.md b/packages/remix-eslint-config/CHANGELOG.md index fc64b7d50a9..83fef161027 100644 --- a/packages/remix-eslint-config/CHANGELOG.md +++ b/packages/remix-eslint-config/CHANGELOG.md @@ -1,5 +1,7 @@ # `@remix-run/eslint-config` +## 1.7.0-pre.0 + ## 1.6.8 ## 1.6.7 diff --git a/packages/remix-eslint-config/package.json b/packages/remix-eslint-config/package.json index 46f8db3d823..8c24ac779a8 100644 --- a/packages/remix-eslint-config/package.json +++ b/packages/remix-eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/eslint-config", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "ESLint configuration for Remix projects", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-express/CHANGELOG.md b/packages/remix-express/CHANGELOG.md index a4a03a93616..594d3f279b2 100644 --- a/packages/remix-express/CHANGELOG.md +++ b/packages/remix-express/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/express` +## 1.7.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-express/package.json b/packages/remix-express/package.json index 8f1d2cf0ea8..24b3d813e14 100644 --- a/packages/remix-express/package.json +++ b/packages/remix-express/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/express", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Express server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -14,7 +14,7 @@ "main": "dist/index.js", "typings": "dist/index.d.ts", "dependencies": { - "@remix-run/node": "1.6.8" + "@remix-run/node": "1.7.0-pre.0" }, "devDependencies": { "@types/express": "^4.17.9", diff --git a/packages/remix-netlify/CHANGELOG.md b/packages/remix-netlify/CHANGELOG.md index 62a92b68623..69081634471 100644 --- a/packages/remix-netlify/CHANGELOG.md +++ b/packages/remix-netlify/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/netlify` +## 1.7.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-netlify/package.json b/packages/remix-netlify/package.json index 0f13318e754..5eeaa3e1b12 100644 --- a/packages/remix-netlify/package.json +++ b/packages/remix-netlify/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/netlify", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Netlify server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -14,7 +14,7 @@ "main": "dist/index.js", "typings": "dist/index.d.ts", "dependencies": { - "@remix-run/node": "1.6.8" + "@remix-run/node": "1.7.0-pre.0" }, "devDependencies": { "@netlify/functions": "^1.0.0" diff --git a/packages/remix-node/CHANGELOG.md b/packages/remix-node/CHANGELOG.md index 418eede4b9f..983b0b34802 100644 --- a/packages/remix-node/CHANGELOG.md +++ b/packages/remix-node/CHANGELOG.md @@ -1,5 +1,18 @@ # `@remix-run/node` +## 1.7.0-pre.0 + +### Minor Changes + +- We've added a new type: `SerializeFrom`. This is used to infer the ([#4013](https://github.com/remix-run/remix/pull/4013)) + JSON-serialized return type of loaders and actions. + +### Patch Changes + +- Fixed a bug when destroying `fileStorage` sessions to prevent deleting entire session directories ([#3986](https://github.com/remix-run/remix/pull/3986)) +- Updated dependencies: + - `@remix-run/server-runtime@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-node/package.json b/packages/remix-node/package.json index 37c365e6525..8af9af12316 100644 --- a/packages/remix-node/package.json +++ b/packages/remix-node/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/node", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Node.js platform abstractions for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -15,7 +15,7 @@ "typings": "dist/index.d.ts", "sideEffects": false, "dependencies": { - "@remix-run/server-runtime": "1.6.8", + "@remix-run/server-runtime": "1.7.0-pre.0", "@remix-run/web-fetch": "^4.1.3", "@remix-run/web-file": "^3.0.2", "@remix-run/web-stream": "^1.0.3", diff --git a/packages/remix-react/CHANGELOG.md b/packages/remix-react/CHANGELOG.md index 064302c8349..5367795d086 100644 --- a/packages/remix-react/CHANGELOG.md +++ b/packages/remix-react/CHANGELOG.md @@ -1,5 +1,16 @@ # `@remix-run/react` +## 1.7.0-pre.0 + +### Minor Changes + +- We've added a new type: `SerializeFrom`. This is used to infer the ([#4013](https://github.com/remix-run/remix/pull/4013)) + JSON-serialized return type of loaders and actions. + +### Patch Changes + +- Unblock hydration via async module scripts. ([#3918](https://github.com/remix-run/remix/pull/3918)) + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-react/package.json b/packages/remix-react/package.json index d5e9ab039be..a3082841ffd 100644 --- a/packages/remix-react/package.json +++ b/packages/remix-react/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/react", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "React DOM bindings for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -21,7 +21,7 @@ "type-fest": "^2.17.0" }, "devDependencies": { - "@remix-run/server-runtime": "*", + "@remix-run/server-runtime": "1.7.0-pre.0", "@testing-library/jest-dom": "^5.16.2", "@testing-library/react": "^13.3.0", "abort-controller": "^3.0.0", diff --git a/packages/remix-serve/CHANGELOG.md b/packages/remix-serve/CHANGELOG.md index 974e24f55c6..e94bf27e16c 100644 --- a/packages/remix-serve/CHANGELOG.md +++ b/packages/remix-serve/CHANGELOG.md @@ -1,5 +1,18 @@ # `@remix-run/serve` +## 1.7.0-pre.0 + +### Minor Changes + +- We've added a new type: `SerializeFrom`. This is used to infer the ([#4013](https://github.com/remix-run/remix/pull/4013)) + JSON-serialized return type of loaders and actions. +- `MetaFunction` type can now infer `data` and `parentsData` types from route loaders ([#4022](https://github.com/remix-run/remix/pull/4022)) + +### Patch Changes + +- Updated dependencies: + - `@remix-run/express@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-serve/package.json b/packages/remix-serve/package.json index c227633120b..54041ce79be 100644 --- a/packages/remix-serve/package.json +++ b/packages/remix-serve/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/serve", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Production application server for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -17,7 +17,7 @@ "remix-serve": "dist/cli.js" }, "dependencies": { - "@remix-run/express": "1.6.8", + "@remix-run/express": "1.7.0-pre.0", "compression": "^1.7.4", "express": "^4.17.1", "morgan": "^1.10.0" diff --git a/packages/remix-server-runtime/CHANGELOG.md b/packages/remix-server-runtime/CHANGELOG.md index a38b9875bec..de1110e4195 100644 --- a/packages/remix-server-runtime/CHANGELOG.md +++ b/packages/remix-server-runtime/CHANGELOG.md @@ -1,5 +1,17 @@ # `@remix-run/server-runtime` +## 1.7.0-pre.0 + +### Minor Changes + +- We've added a new type: `SerializeFrom`. This is used to infer the ([#4013](https://github.com/remix-run/remix/pull/4013)) + JSON-serialized return type of loaders and actions. +- `MetaFunction` type can now infer `data` and `parentsData` types from route loaders ([#4022](https://github.com/remix-run/remix/pull/4022)) + +### Patch Changes + +- Improved performance for data serialization at runtime ([#3889](https://github.com/remix-run/remix/pull/3889)) + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-server-runtime/package.json b/packages/remix-server-runtime/package.json index 15032c81dc8..291daaee832 100644 --- a/packages/remix-server-runtime/package.json +++ b/packages/remix-server-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/server-runtime", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Server runtime for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-vercel/CHANGELOG.md b/packages/remix-vercel/CHANGELOG.md index 3d16c64880d..21513fbdba1 100644 --- a/packages/remix-vercel/CHANGELOG.md +++ b/packages/remix-vercel/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/vercel` +## 1.7.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@1.7.0-pre.0` + ## 1.6.8 ### Patch Changes diff --git a/packages/remix-vercel/package.json b/packages/remix-vercel/package.json index a358f91228c..277023dc04f 100644 --- a/packages/remix-vercel/package.json +++ b/packages/remix-vercel/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/vercel", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "Vercel server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -14,7 +14,7 @@ "main": "dist/index.js", "typings": "dist/index.d.ts", "dependencies": { - "@remix-run/node": "1.6.8" + "@remix-run/node": "1.7.0-pre.0" }, "devDependencies": { "@types/supertest": "^2.0.10", diff --git a/packages/remix/package.json b/packages/remix/package.json index c85bd9a6456..19e18c1e5e5 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "remix", - "version": "1.6.8", + "version": "1.7.0-pre.0", "description": "A framework for building better websites", "homepage": "https://remix.run", "bugs": { From 3d3813516971073ad746f021af5b4b17b8da7f1f Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Wed, 24 Aug 2022 14:56:28 -0700 Subject: [PATCH 10/29] chore: ignore root env --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b86c2b12f74..bf6808a4658 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store +/.env /build/ /packages/*/dist/ /packages/*/LICENSE.md From 892a11f2f5a25ce10f762a5b319dfa2bab61cbe5 Mon Sep 17 00:00:00 2001 From: Chance Strickland Date: Wed, 24 Aug 2022 14:56:28 -0700 Subject: [PATCH 11/29] chore: ignore root env --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b86c2b12f74..bf6808a4658 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store +/.env /build/ /packages/*/dist/ /packages/*/LICENSE.md From f67489ae424484de810e7999a8679e555fb96858 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Wed, 24 Aug 2022 19:04:22 -0400 Subject: [PATCH 12/29] ci: use graphql api for tags (#4063) --- .github/workflows/nightly.yml | 1 + .github/workflows/postrelease.yml | 4 +- .github/workflows/release-comments.yml | 4 +- scripts/release/constants.ts | 5 +- scripts/release/github.ts | 118 +++++++++++++------------ scripts/release/package-lock.json | 6 +- scripts/release/utils.ts | 2 +- 7 files changed, 74 insertions(+), 66 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 41e3303c9ef..0d67975636c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -102,6 +102,7 @@ jobs: uses: remix-run/remix/.github/workflows/release-comments.yml@main with: ref: "refs/tags/v${{ needs.nightly.outputs.NEXT_VERSION }}" + packageVersionToFollow: "remix" deployments: needs: [nightly] diff --git a/.github/workflows/postrelease.yml b/.github/workflows/postrelease.yml index d95399b8a11..9fc21be9690 100644 --- a/.github/workflows/postrelease.yml +++ b/.github/workflows/postrelease.yml @@ -14,8 +14,8 @@ jobs: uses: remix-run/remix/.github/workflows/release-comments.yml@main with: ref: ${{ github.ref }} - # this should match the above tag to watch including the trailing "@" - packageVersionToFollow: "remix@" + # this should match the above tag to watch not including the trailing "@" + packageVersionToFollow: "remix" deployments: needs: [release] diff --git a/.github/workflows/release-comments.yml b/.github/workflows/release-comments.yml index 159a8d2f062..47cac0c861f 100644 --- a/.github/workflows/release-comments.yml +++ b/.github/workflows/release-comments.yml @@ -7,7 +7,7 @@ on: required: true type: string packageVersionToFollow: - required: false + required: true type: string jobs: @@ -41,4 +41,4 @@ jobs: VERSION: ${{ inputs.ref }} DEFAULT_BRANCH: "main" NIGHTLY_BRANCH: "dev" - PACKAGE_VERSION_TO_FOLLOW: ${{ inputs.packageToWatch }} + PACKAGE_VERSION_TO_FOLLOW: ${{ inputs.packageVersionToFollow }} diff --git a/scripts/release/constants.ts b/scripts/release/constants.ts index 0c775284a89..90c8abada38 100644 --- a/scripts/release/constants.ts +++ b/scripts/release/constants.ts @@ -18,10 +18,11 @@ if (!process.env.VERSION) { if (!/^refs\/tags\//.test(process.env.VERSION)) { throw new Error("VERSION must start with refs/tags/"); } +if (!process.env.PACKAGE_VERSION_TO_FOLLOW) { + throw new Error("PACKAGE_VERSION_TO_FOLLOW is required"); +} export const [OWNER, REPO] = process.env.GITHUB_REPOSITORY.split("/"); -// this one is optional, nightlies only create a single tag, -// but stable releases create one for each package export const PACKAGE_VERSION_TO_FOLLOW = process.env.PACKAGE_VERSION_TO_FOLLOW; export const VERSION = cleanupTagName(cleanupRef(process.env.VERSION)); export const GITHUB_TOKEN = process.env.GITHUB_TOKEN; diff --git a/scripts/release/github.ts b/scripts/release/github.ts index 5f3c26791fa..8a91fc8835d 100644 --- a/scripts/release/github.ts +++ b/scripts/release/github.ts @@ -34,12 +34,14 @@ export async function prsMergedSinceLastTag({ repo, githubRef, }: PrsMergedSinceLastTagOptions): Promise { - let tags = await getAllTags(owner, repo); + let tags = await getTags(owner, repo); let { currentTag, previousTag } = getPreviousTagFromCurrentTag( githubRef, tags ); + console.log(`Getting PRs merged ${previousTag.tag}...${currentTag.tag}`); + /** nightly > nightly => 'dev' nightly > stable => 'main' @@ -117,71 +119,47 @@ async function getPullRequestWithFiles( function getPreviousTagFromCurrentTag( currentTag: string, - tags: Awaited> + tags: Awaited> ): { previousTag: MinimalTag; currentTag: MinimalTag; } { let validTags = tags - .filter((tag) => { - // if we have a `PACKAGE_VERSION_TO_FOLLOW` - // we only want to get the tags related to it - if (PACKAGE_VERSION_TO_FOLLOW) { - return tag.name.startsWith(PACKAGE_VERSION_TO_FOLLOW); - } - return true; - }) .map((tag) => { let tagName = cleanupTagName(tag.name); let isPrerelease = semver.prerelease(tagName) !== null; - if (!tag.commit.committer?.date) return null; - return { tag: tagName, - date: new Date(tag.commit.committer.date), + date: new Date(tag.target.tagger.date), isPrerelease, }; }) .filter((v: any): v is MinimalTag => typeof v !== "undefined") .sort(sortByDate); - let tmpCurrentTagIndex = validTags.findIndex((tag) => tag.tag === currentTag); - let tmpCurrentTagInfo = validTags.at(tmpCurrentTagIndex); + let currentTagIndex = validTags.findIndex((tag) => tag.tag === currentTag); + let currentTagInfo: MinimalTag | undefined = validTags.at(currentTagIndex); + let previousTagInfo: MinimalTag | undefined; - if (!tmpCurrentTagInfo) { + if (!currentTagInfo) { throw new Error(`Could not find last tag ${currentTag}`); } - let currentTagInfo: MinimalTag | undefined; - let previousTagInfo: MinimalTag | undefined; - // if the currentTag was a stable tag, then we want to find the previous stable tag - if (!tmpCurrentTagInfo.isPrerelease) { - let stableTags = validTags + if (!currentTagInfo.isPrerelease) { + validTags = validTags .filter((tag) => !tag.isPrerelease) .sort((a, b) => semver.rcompare(a.tag, b.tag)); - let stableTagIndex = stableTags.findIndex((tag) => tag.tag === currentTag); - currentTagInfo = stableTags.at(stableTagIndex); + currentTagIndex = validTags.findIndex((tag) => tag.tag === currentTag); + currentTagInfo = validTags.at(currentTagIndex); if (!currentTagInfo) { throw new Error(`Could not find last stable tag ${currentTag}`); } - - previousTagInfo = stableTags.at(stableTagIndex + 1); - if (!previousTagInfo) { - throw new Error(`Could not find previous stable tag from ${currentTag}`); - } - - return { currentTag: currentTagInfo, previousTag: previousTagInfo }; } - currentTagInfo = tmpCurrentTagInfo; - if (!currentTagInfo) { - throw new Error(`Could not find last tag ${currentTag}`); - } - - previousTagInfo = validTags.at(tmpCurrentTagIndex + 1); + previousTagInfo = validTags.at(currentTagIndex + 1); if (!previousTagInfo) { throw new Error( `Could not find previous prerelease tag from ${currentTag}` @@ -235,27 +213,57 @@ async function getMergedPRsBetweenTags( return [...nodes, ...merged]; } -// TODO: we might be able to get away with just getting up until the "latest" tag -async function getAllTags(owner: string, repo: string) { - let tags = await octokit.paginate(octokit.rest.repos.listTags, { - owner, - repo, - }); - - return await Promise.all( - tags.map(async (tag) => { - let commit = await octokit.rest.repos.getCommit({ - owner, - repo, - ref: tag.commit.sha, - }); +interface GitHubGraphqlTag { + name: string; + target: { + oid: string; + tagger: { + date: string; + }; + }; +} +interface GitHubGraphqlTagResponse { + repository: { + refs: { + nodes: Array; + }; + }; +} - return { - ...tag, - commit: commit.data.commit, - }; - }) +async function getTags(owner: string, repo: string) { + let response: GitHubGraphqlTagResponse = await graphqlWithAuth( + gql` + query GET_TAGS($owner: String!, $repo: String!) { + repository(owner: $owner, name: $repo) { + refs( + refPrefix: "refs/tags/" + first: 100 + orderBy: { field: TAG_COMMIT_DATE, direction: DESC } + ) { + nodes { + name + target { + oid + ... on Tag { + tagger { + date + } + } + } + } + } + } + } + `, + { owner, repo } ); + + return response.repository.refs.nodes.filter((node) => { + return ( + node.name.startsWith(PACKAGE_VERSION_TO_FOLLOW) || + node.name.startsWith("v0.0.0-nightly-") + ); + }); } export async function getIssuesClosedByPullRequests( diff --git a/scripts/release/package-lock.json b/scripts/release/package-lock.json index b5405fce448..fa9bd139d93 100644 --- a/scripts/release/package-lock.json +++ b/scripts/release/package-lock.json @@ -694,8 +694,7 @@ "@octokit/plugin-request-log": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", - "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", - "requires": {} + "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==" }, "@octokit/plugin-rest-endpoint-methods": { "version": "5.14.0", @@ -916,8 +915,7 @@ "esbuild-register": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.3.3.tgz", - "integrity": "sha512-eFHOkutgIMJY5gc8LUp/7c+LLlDqzNi9T6AwCZ2WKKl3HmT+5ef3ZRyPPxDOynInML0fgaC50yszPKfPnjC0NQ==", - "requires": {} + "integrity": "sha512-eFHOkutgIMJY5gc8LUp/7c+LLlDqzNi9T6AwCZ2WKKl3HmT+5ef3ZRyPPxDOynInML0fgaC50yszPKfPnjC0NQ==" }, "esbuild-sunos-64": { "version": "0.14.44", diff --git a/scripts/release/utils.ts b/scripts/release/utils.ts index 40207c7c486..ec35360a581 100644 --- a/scripts/release/utils.ts +++ b/scripts/release/utils.ts @@ -24,7 +24,7 @@ export function getGitHubUrl(type: "pull" | "issue", number: number) { export function cleanupTagName(tagName: string) { if (PACKAGE_VERSION_TO_FOLLOW) { - let regex = new RegExp(`^${PACKAGE_VERSION_TO_FOLLOW}`); + let regex = new RegExp(`^${PACKAGE_VERSION_TO_FOLLOW}@`); return tagName.replace(regex, ""); } From 3200c56965c9f6b7b82cf863837c5260646979df Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 25 Aug 2022 10:51:38 -0400 Subject: [PATCH 13/29] docs: First pass at defer API design doc (#3851) * docs: First pass at defer API design doc * Add summary/details sections * More updates * Update design doc to remove support for naked defer responses * Simplify bullet points * Updates --- decisions/0003-streaming-apis.md | 193 +++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 decisions/0003-streaming-apis.md diff --git a/decisions/0003-streaming-apis.md b/decisions/0003-streaming-apis.md new file mode 100644 index 00000000000..dbd4f5c7846 --- /dev/null +++ b/decisions/0003-streaming-apis.md @@ -0,0 +1,193 @@ +--- +title: Remix (and React Router) Streaming APIs +--- + +# Title + +Date: 2022-07-27 + +Status: accepted + +## Context + +Remix aims to provide first-class support for React 18's streaming capabilities. Throughout the development process we went through many iterations and naming schemes around the APIs we plan to build into Remix to support streaming, so this document aims to lay out the final names we chose and the reasons behind it. + +It's also worth nothing that even in a single-page-application without SSR-streaming, the same concepts still apply so these decisions were made with React Router 6.4.0 in mind as well - which will support the same Data APIs from Remix. + +## Decision + +Streaming in Remix can be thought of as having 3 touch points with corresponding APIs: + +1. _Initiating_ a streamed response in your `loader` can be done by returning a `defer(object)` call from your `loader` in which some of the keys on `object` are `Promise` instances +2. _Accessing_ a streamed response from `useLoaderData` + 1. No new APIs here - when you return a `defer()` response from your loader, you'll get `Promise` values inside your `useLoaderData` object 👌 +3. _Rendering_ a streamed value (with fallback and error handling) in your component + 1. You can render a `Promise` from `useLoaderData()` with the `` component + 2. `` accepts an `errorElement` prop to handle error UI + 3. `` should be wrapped with a `` component to handle your loading UI + +## Details + +In the spirit of `#useThePlatform` we've chosen to leverage the `Promise` API to represent these "eventually available" values. When Remix receives a `defer()` response back from a `loader`, it needs to serialize that `Promise` over the network to the client application (prompting Jacob to coin the phrase [_"promise teleportation over the network"_][promise teleportation] 🔥). + +### Initiating + +In order to initiate a streamed response in your `loader`, you can use the `defer()` utility which accepts a JSON object with `Promise` values from your `loader`. + +```js +async function loader() { + return defer({ + // Await this, don't stream + critical: await fetchCriticalData(), + // Don't await this - stream it! + lazy: fetchLazyData(), + }); +} +``` + +By not using `await` on `fetchLazyData()` Remix knows that this value is not ready yet _but eventually will be_ and therefore Remix will leverage a streamed HTTP response allowing it to send up the resolved/rejected value when available. Essentially serializing/teleporting that Promise over the network via a streamed HTTP response. + +Just like `json()`, the `defer()` will accept a second optional `responseInit` param that lets you customize the resulting `Response` (i.e., in case you need to set custom headers). + +The name `defer` was settled on as a corollary to `