Unverified Commit 4354edad authored by Leah's avatar Leah Committed by GitHub

fix snapshots broken by prettier (also fix .prettierignore) (#48586)

### What?
Fix snapshots that were no longer fulfilling the original purpose after
prettier had its way.

The `.prettierignore` also had the old `target/` directory (prior to the
`Cargo.toml` move in #48198) so running `pnpm prettier-fix` formatted
files in the `target/` directory
parent a06fef09
node_modules
**/.next/**
**/_next/**
**/dist/**
# Build artifacts
.next/
.turbo/
_next/
__tmp__/
dist/
node_modules/
target/
compiled/
lerna.json
test-timings.json
pnpm-lock.yaml
packages/next/src/bundles/webpack/packages/*.runtime.js
packages/next/src/bundles/webpack/packages/lazy-compilation-*.js
packages/next/src/compiled/**
packages/react-refresh-utils/**/*.js
packages/react-refresh-utils/**/*.d.ts
packages/react-dev-overlay/lib/**
**/__tmp__/**
lerna.json
.github/actions/next-stats-action/.work
.github/actions/issue-validator/index.mjs
.github/actions/issue-labeler/lib/index.js
packages/next-swc/crates/next-core/js/src/compiled/**/*
packages/next-swc/crates/**/tests/**/output*
packages/next-swc/target/**/*
packages/next-swc/crates/core/tests/loader/issue-32553/input.js
packages/next-swc/native/**/*
packages/next-codemod/transforms/__testfixtures__/**/*
packages/next-codemod/transforms/__tests__/**/*
packages/next-codemod/transforms/__testfixtures__/**
packages/next-codemod/transforms/__tests__/**
packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
test-timings.json
test/**/out/**
test/development/basic/hmr/components/parse-error.js
bench/nested-deps/pages/**/*
bench/nested-deps/components/**/*
pnpm-lock.yaml
**/convex/_generated/**
import 'react'
;('use client')
// prettier-ignore
'use client'
export default function () {
return null
......
x NEXT_RSC_ERR_CLIENT_DIRECTIVE_PAREN
,-[input.js:1:1]
1 | import 'react'
2 | ;('use client')
: ^^^^^^^^^^^^^^
x NEXT_RSC_ERR_CLIENT_DIRECTIVE
,-[input.js:3:1]
3 | // prettier-ignore
4 | 'use client'
: ^^^^^^^^^^^^
`----
......@@ -5,5 +5,7 @@ const foo = async () => {
const bar = async () => {
const x = 1
;('use server')
// prettier-ignore
'use server'
}
......@@ -5,5 +5,6 @@ export const $$ACTION_1 = async (closure)=>{
var $$ACTION_0;
const bar = async ()=>{
const x = 1;
// prettier-ignore
'use server';
};
x The "use server" directive must be at the top of the function body.
,-[input.js:9:1]
9 | // prettier-ignore
10 | 'use server'
: ^^^^^^^^^^^^
11 | }
`----
import 'my-module'
;('use server')
// prettier-ignore
'use server'
x The "use server" directive must be at the top of the file, and cannot be wrapped in parentheses.
,-[input.js:1:1]
1 | import 'my-module'
2 | ;('use server')
: ^^^^^^^^^^^^^^
x The "use server" directive must be at the top of the file.
,-[input.js:3:1]
3 | // prettier-ignore
4 | 'use server'
: ^^^^^^^^^^^^
`----
......@@ -15,12 +15,16 @@
'use client'
import 'fs'
;('bar')
// prettier-ignore
'bar'
// This is a comment.
1 + 1
;('baz')
// prettier-ignore
'baz'
export default function () {
return null
......
......@@ -3,10 +3,12 @@
// This is a comment.
'foo';
import 'fs';
// prettier-ignore
'bar';
// This is a comment.
1 + 1;
// prettier-ignore
'baz';
export default function() {
return null;
return null;
}
......@@ -13,12 +13,16 @@
'random-directive'
import 'fs'
;('qwerty')
// prettier-ignore
'qwerty'
// This is a comment.
1 + 1
;('sasaya')
// prettier-ignore
'sasaya'
export default function () {
return null
......
;<div>children</div>
;('<>hello</>')
<div>children</div>; '<>hello</>'
use turbo_binding::turbo::tasks_build::{generate_register, rerun_if_glob};
use turbo_binding::turbo::tasks_build::generate_register;
use vergen::{vergen, Config};
fn main() {
generate_register();
rerun_if_glob("tests/integration/*/*", "tests/integration");
// Attempt to collect some build time env values but will skip if there are any
// errors.
let _ = vergen(Config::default());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment