Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextJS 13.3 app directory & frameworks CTA #5691

Merged
merged 27 commits into from
May 2, 2023
Merged

Conversation

jamesdaniels
Copy link
Member

@jamesdaniels jamesdaniels commented Apr 14, 2023

Next 13.3 app directory changed in a couple important ways:

  • Can have prerendered content
  • Can have static files
  • Can have API routes

This broke our integration, see #5661

While I'm mucking around in here:

src/frameworks/index.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2023

Codecov Report

Patch coverage: 46.76% and no project coverage change.

Comparison is base (ada638b) 55.21% compared to head (c024f5c) 55.21%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5691   +/-   ##
=======================================
  Coverage   55.21%   55.21%           
=======================================
  Files         327      328    +1     
  Lines       22326    22400   +74     
  Branches     4561     4570    +9     
=======================================
+ Hits        12327    12368   +41     
- Misses       8904     8933   +29     
- Partials     1095     1099    +4     
Impacted Files Coverage Δ
src/frameworks/flutter/index.ts 88.00% <ø> (ø)
src/frameworks/lit/index.ts 100.00% <ø> (ø)
src/frameworks/preact/index.ts 100.00% <ø> (ø)
src/frameworks/react/index.ts 100.00% <ø> (ø)
src/frameworks/svelte/index.ts 100.00% <ø> (ø)
src/frameworks/sveltekit/index.ts 36.11% <ø> (ø)
src/frameworks/next/index.ts 14.95% <11.26%> (-0.76%) ⬇️
src/frameworks/utils.ts 45.45% <38.46%> (-8.72%) ⬇️
src/frameworks/index.ts 12.03% <66.66%> (-5.88%) ⬇️
src/frameworks/next/utils.ts 89.28% <81.08%> (-6.95%) ⬇️
... and 9 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

if (!isNextImageImported && isUsingAppDirectory(dir)) {
isNextImageImported = (await readFile(join(dir, "server", "client-reference-manifest.js")))
.toString()
.includes("node_modules/next/dist/client/image.js");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO be smarter about this, should we read the json, require.resolve the client name?

@jamesdaniels jamesdaniels marked this pull request as ready for review May 1, 2023 14:37
leoortizz and others added 3 commits May 1, 2023 20:50
* add static API to Next.js test app

* use `emulators:exec 'exit 0'` instead of `deploy`

* add `test:webframeworks-deploy` script to GH action

* temporarily disable `needs: unit`

* `..env.FBTOOLS_TARGET_PROJECT` for FIREBASE_PROJECT

* source scripts/set-default-credentials.sh

* pass "exit 0" as arg to the CLI

* adjust tests to match project

* rename test case

* remove log

* util to get build id

* test static files

* Revert "temporarily disable `needs: unit`"

This reverts commit b9eb90a.

* restore experiment flag

* Rework expected files

* Boolean fixes

---------

Co-authored-by: James Daniels <jamesdaniels@google.com>
@leoortizz leoortizz self-requested a review May 2, 2023 01:12
Copy link
Member

@leoortizz leoortizz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jamesdaniels jamesdaniels enabled auto-merge (squash) May 2, 2023 01:23
@jamesdaniels jamesdaniels merged commit e5981f2 into master May 2, 2023
32 of 34 checks passed
@jamesdaniels jamesdaniels deleted the frameworksCTA branch May 2, 2023 01:31
jamesdaniels added a commit that referenced this pull request May 2, 2023
jamesdaniels added a commit that referenced this pull request May 2, 2023
ProfHercules pushed a commit to ProfHercules/firebase-tools that referenced this pull request May 5, 2023
* Handle Next 13 app directory—fixes firebase#5661, firebase#5522 
* Actually pull static assets from app directory now that it's stabilizing, fixes firebase#5660
* Hack for detecting image optimization in app directory
* Add frameworks CTA
* Add integration test for frameworks back in
* Add timeouts to NPM and bundle commands—fixes firebase#5661, firebase#5622

---------

Co-authored-by: Leonardo Ortiz <leo@monogram.io>
ProfHercules pushed a commit to ProfHercules/firebase-tools that referenced this pull request May 5, 2023
tonyjhuang pushed a commit that referenced this pull request May 22, 2023
* Handle Next 13 app directory—fixes #5661, #5522 
* Actually pull static assets from app directory now that it's stabilizing, fixes #5660
* Hack for detecting image optimization in app directory
* Add frameworks CTA
* Add integration test for frameworks back in
* Add timeouts to NPM and bundle commands—fixes #5661, #5622

---------

Co-authored-by: Leonardo Ortiz <leo@monogram.io>
tonyjhuang pushed a commit that referenced this pull request May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why does firebase deploy list a static page as non-static
3 participants