-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
Update swc_core to v0.75.23
#48098
Update swc_core to v0.75.23
#48098
Conversation
Failing test suitesCommit: 9274d5a
Expand output● single child
● multiple child with default legacyBehavior
● multiple child with forced legacyBehavior=false
Read more about building and testing Next.js in contributing.md. |
New dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No new dependency issues detected in pull request Bot CommandsTo ignore an alert, reply with a comment starting with Pull request alert summary
📊 Modified Dependency Overview:
🚮 Removed packages: @swc/core@1.2.203 |
7507ba3
to
3c38896
Compare
@@ -199,7 +199,7 @@ async function postProcessHTML( | |||
: null, | |||
process.env.NEXT_RUNTIME !== 'edge' && renderOpts.optimizeFonts | |||
? async (html: string) => { | |||
const getFontDefinition = (url: string): string => { | |||
const getFontDefinition = (url: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed WEB-875
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be fixed by swc-project/swc#7232
769229d
to
5b9ccf5
Compare
any updates? |
Investigationexport const NextDynamicNoSSRServerComponent = dynamic(
() => import('../text-dynamic-no-ssr-server'),
{
ssr: false,
}
) this is the cause, and it works if I remove |
Further investigation:
|
c63e80d
to
21bbd46
Compare
Further investigation:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vercel/turborepo#4470 is approved/merged along with this PR
### What? swc_core dependencies update ### Why? follow-up from #48098
Hello, was hoping to get some assistance with an issue that I believe this PR introduced in When a component contained a hook like import * as NextNavigation from 'next/navigation';
describe('test...', () => {
it('should...', () => {
const pathname = cy.stub().as('usePathname').returns('/en/public');
cy.stub(NextNavigation, 'usePathname').returns(pathname());
})
}) This approach worked for me up until this canary version was release. Now it throws the following error:
Does anyone have a suggestion on how to resolve this? |
Update: for those who come across this as well, I managed to solve by creating my own mount function specifically for components that depend on these hooks. Here's an abbreviated implementation: import { MountOptions, MountReturn, mount } from 'cypress/react18';
import { AppRouterContext } from 'next/dist/shared/lib/app-router-context';
import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context';
declare global {
namespace Cypress {
interface Chainable {
mount: typeof mount;
nextMount: (jsx: React.ReactNode, options?: Partial<MountOptions & {
pathname?: string;
}>) => Chainable<MountReturn>;
}
}
}
Cypress.Commands.add('mount', mount);
Cypress.Commands.add('nextMount', (component, options) => {
const router = {
back: cy.stub().as('router:back'),
forward: cy.stub().as('router:forward'),
prefetch: cy.stub().as('router:prefetch'),
push: cy.stub().as('router:push'),
reload: cy.stub().as('router:reload'),
refresh: cy.stub().as('router:refresh'),
replace: cy.stub().as('router:replace')
};
const pathname = options?.pathname ?? '/';
return mount(
<AppRouterContext.Provider value={ router }>
<PathnameContext.Provider value={ pathname }>
{ component }
</PathnameContext.Provider>
</AppRouterContext.Provider>
);
}); |
Depends on vercel/turborepo#4470
next build
with 13.2.4 #46989