Unverified Commit 14752e30 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: pull in updated vercel/nft tests (#91651)

parent 7984e4ab
......@@ -10470,6 +10470,7 @@ dependencies = [
"turbopack",
"turbopack-core",
"turbopack-ecmascript",
"turbopack-node",
"turbopack-resolve",
]
......
......@@ -33,6 +33,7 @@ turbo-tasks-backend = { workspace = true }
turbopack-core = { workspace = true }
turbopack-resolve = { workspace = true }
turbopack-ecmascript = { workspace = true }
turbopack-node = { workspace = true, default-features = false, features = ["process_pool"]}
criterion = { workspace = true, features = ["async_tokio"] }
difference = "2.0"
......
......@@ -64,8 +64,8 @@ static ALLOC: turbo_tasks_malloc::TurboMalloc = turbo_tasks_malloc::TurboMalloc;
#[case::apollo("integration/apollo.js")]
#[case::argon2("integration/argon2.js")]
#[case::auth0("integration/auth0.js")]
#[case::aws_sdk_old("integration/aws-sdk-old.js")]
#[case::aws_sdk("integration/aws-sdk.js")]
#[case::aws_sdk3("integration/aws-sdk3.js")]
#[case::axios("integration/axios.js")]
#[case::azure_cosmos("integration/azure-cosmos.js")]
#[case::azure_storage("integration/azure-storage.js")]
......@@ -147,7 +147,7 @@ static ALLOC: turbo_tasks_malloc::TurboMalloc = turbo_tasks_malloc::TurboMalloc;
#[case::passport("integration/passport.js")]
#[case::path_platform("integration/path-platform.js")]
#[case::pixelmatch("integration/pixelmatch.js")]
#[case::pdf2json("integration/pdf2json.mjs")]
#[case::pdf2json("integration/pdf2json.js")]
#[case::pdfkit("integration/pdfkit.js")]
#[case::pg("integration/pg.js")]
#[case::pino("integration/pino.js")]
......@@ -183,6 +183,15 @@ static ALLOC: turbo_tasks_malloc::TurboMalloc = turbo_tasks_malloc::TurboMalloc;
case::sharp("integration/sharp.js")
)]
#[cfg_attr(not(target_os = "windows"), case::sharp("integration/sharp.js"))]
#[cfg_attr(
target_os = "windows",
should_panic(expected = "Something went wrong installing the \"sharp\" module"),
case::sharp_pnpm("integration/sharp-pnpm.js")
)]
#[cfg_attr(
not(target_os = "windows"),
case::sharp_pnpm("integration/sharp-pnpm.js")
)]
#[case::shiki("integration/shiki.js")]
#[case::simple("integration/simple.js")]
#[case::socket_io("integration/socket.io.js")]
......
const aws = require('aws-sdk')
const { S3 } = require('@aws-sdk/client-s3')
new aws.S3()
new S3()
const axios = require('axios')
;(async () => {
const { data } = await axios({
url: 'https://dog.ceo/api/breeds/image/random',
const { status } = await axios({
url: 'https://example.vercel.sh',
})
if (data.status !== 'success') {
if (status !== 200) {
throw new Error('Unexpected response: ' + JSON.stringify(data))
}
})()
const bcrypt = require('bcrypt')
// Fixed salt for deterministic outputs between Turbopack and @vercel/nft
// bcrypt.genSaltSync(10)
const salt = '$2b$10$V/DVgHU.feqOSsssV5gHY.'
......
let imp = (path) => import(`unified/${path}.js`)
let imp = (path) => import(`twilio/${path}.js`)
imp('index')
const assert = require('assert')
const express = require('express')
const path = require('path')
const app = express()
app.engine('pug', require('pug').__express)
app.set('view engine', 'pug')
app.set('views', './fixtures/pug')
app.set('views', path.join(__dirname, 'views'))
app.render(
'index',
{
title: 'Consolidate.js',
},
function (err, rendered) {
if (err) throw err
assert.ok(rendered.includes('<h1>Consolidate.js</h1>'))
}
)
app.get('*', (req, res) => {
res.render('index')
})
module.exports = app
const fetch = require('isomorphic-unfetch')
;(async () => {
const res = await fetch('https://dog.ceo/api/breeds/image/random')
const data = await res.json()
if (data.status !== 'success') {
throw new Error('Unexpected response: ' + JSON.stringify(data))
const { status } = await fetch('https://example.vercel.sh')
if (status !== 200) {
throw new Error(`Unexpected status: ${status}`)
}
})()
import { parse } from 'url'
import PDFParser from 'pdf2json'
const { parse } = require('url')
const PDFParser = require('pdf2json')
export default function (req, res) {
module.exports = (req, res) => {
const { query } = parse(req.url, true)
const { name = 'World' } = query
res.end(`Hello ${name}!`)
......
const request = require('request')
const url = 'https://dog.ceo/api/breeds/image/random'
;(async () => {
await new Promise((resolve, reject) => {
request.get(url, { json: true }, (err, resp, body) => {
request.get('https://example.vercel.sh', { json: false }, (err, res) => {
if (err) return reject(err)
if (body.status != 'success') {
return reject(new Error('Bad api response: ' + JSON.stringify(body)))
if (res.statusCode !== 200) {
return reject(new Error(`Bad status: ${res.statusCode}`))
}
resolve()
resolve(true)
})
})
})()
const sharp = require('sharp')
const roundedCorners = Buffer.from(
'<svg><rect x="0" y="0" width="200" height="200" rx="50" ry="50"/></svg>'
)
sharp(roundedCorners).resize(200, 200).png().toBuffer()
const sharp = require('sharp')
const path = require('path')
const roundedCorners = Buffer.from(
'<svg><rect x="0" y="0" width="200" height="200" rx="50" ry="50"/></svg>'
)
sharp(roundedCorners).resize(200, 200).png().toBuffer()
sharp(path.resolve(__dirname, 'fixtures/vercel.svg'))
.resize({ width: 100, height: 100 })
.jpeg()
.toBuffer()
......@@ -4,15 +4,15 @@
"private": true,
"devDependencies": {
"@aws-sdk/client-s3": "^3.787.0",
"@azure/cosmos": "^2.1.7",
"@bugsnag/js": "^6.3.2",
"@datadog/pprof": "^5.2.0",
"@ffmpeg-installer/ffmpeg": "^1.0.19",
"@google-cloud/bigquery": "^4.1.4",
"@google-cloud/firestore": "^4.11.0",
"@azure/cosmos": "^4.3.0",
"@bugsnag/js": "^8.2.0",
"@datadog/pprof": "^5.9.0",
"@ffmpeg-installer/ffmpeg": "^1.1.0",
"@google-cloud/bigquery": "^7.9.2",
"@google-cloud/firestore": "^7.6.0",
"@mdx-js/node-loader": "^2.2.1",
"@opentelemetry/api": "^1.7.0",
"@sentry/node": "^5.5.0",
"@sentry/node": "^9.2.0",
"@tpluscode/sparql-builder": "^0.3.12",
"@types/bindings": "^1.3.0",
"@types/debug": "^4.1.7",
......@@ -20,89 +20,91 @@
"@types/glob": "^7.1.2",
"@types/graceful-fs": "^4.1.5",
"@types/micromatch": "^4.0.1",
"@types/node": "14.18.29",
"@types/node": "^14.14.37",
"@vercel/nft": "0.27.1",
"@zeit/cosmosdb-query": "^0.7.2",
"analytics-node": "^3.4.0-beta.1",
"apollo-server-express": "^2.14.2",
"argon2": "^0.27.2",
"auth0": "^2.27.1",
"analytics-node": "^6.2.0",
"apollo-server-express": "^3.13.0",
"argon2": "^0.41.1",
"auth0": "^3.0.1",
"aws-sdk": "^2.1218.0",
"axios": "^0.21.2",
"axios": "^1.8.2",
"azure-storage": "^2.10.3",
"bcrypt": "^5.1.0",
"bcrypt": "^5.0.1",
"better-sqlite3": "^9.2.2",
"bindings": "^1.5.0",
"browserify-middleware": "^8.1.1",
"bull": "^3.10.0",
"bullmq": "^1.87.1",
"bull": "^4.16.5",
"bullmq": "^5.48.0",
"camaro": "^6.1.0",
"canvas": "^2.11.2",
"chromeless": "^1.5.2",
"codecov": "^3.8.1",
"consolidate": "^0.15.1",
"consolidate": "^1.0.4",
"copy": "^0.3.2",
"core-js": "2",
"cowsay": "^1.4.0",
"debug": "^4.3.4",
"es-get-iterator": "^1.1.0",
"esbuild": "^0.15.7",
"esbuild": "^0.25.0",
"esm": "^3.2.25",
"express": "^4.17.1",
"express": "^4.21.2",
"fast-glob": "^3.1.1",
"fetch-h2": "^2.2.0",
"fetch-h2": "^3.0.2",
"ffmpeg-static": "^5.2.0",
"firebase-admin": "^9.7.0",
"firebase": "^7",
"firebase-admin": "^13.2.0",
"fluent-ffmpeg": "^2.1.2",
"geo-tz": "^7.0.1",
"geoip-lite": "^1.4.10",
"got": "11",
"graphql": "^14.4.2",
"graphql": "^16.10.0",
"highlights": "^3.1.6",
"hot-shots": "^9.0.0",
"ioredis": "^4.11.1",
"isomorphic-unfetch": "^3.0.0",
"jest": "^27.4.5",
"jimp": "^0.6.4",
"hot-shots": "^10.2.1",
"ioredis": "^5.6.0",
"isomorphic-unfetch": "^4.0.2",
"jest": "^29.7.0",
"jimp": "^1.6.0",
"jugglingdb": "^2.0.1",
"koa": "^2.7.0",
"koa": "^2.16.1",
"leveldown": "^5.6.0",
"lighthouse": "^12.3.0",
"loopback": "^3.26.0",
"mailgun": "^0.5.0",
"mariadb": "^2.0.5",
"memcached": "^2.2.2",
"mongoose": "^5.7.5",
"microtime": "^3.0.0",
"mongoose": "^8.13.2",
"mysql": "^2.17.1",
"npm": "^6.14.6",
"oracledb": "^6.2.0",
"paraphrase": "1.8.0",
"passport": "^0.4.0",
"passport": "^0.7.0",
"passport-google-oauth": "^2.0.0",
"passport-trakt": "^1.0.4",
"path-platform": "^0.11.15",
"pdf2json": "^2.1.0",
"pdfkit": "^0.10.0",
"pg": "^7.11.0",
"pdf2json": "^3.1.5",
"pdfkit": "^0.16.0",
"pg": "^8.13.3",
"phantomjs-prebuilt": "^2.1.16",
"pixelmatch": "^5.3.0",
"pixelmatch": "^5.2.1",
"pino": "^10.1.0",
"pino-pretty": "^13.1.2",
"playwright-core": "^1.17.1",
"polyfill-library": "3.93.0",
"prismjs": "^1.25.0",
"pug": "^3.0.1",
"prismjs": "^1.30.0",
"pug": "^3.0.3",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"redis": "^3.1.1",
"remark-parse": "^10.0.0",
"remark-parse": "^11.0.0",
"remark-prism": "^1.3.6",
"request": "^2.88.2",
"rimraf": "^3.0.2",
"rxjs": "^6.5.2",
"rxjs": "^7.8.2",
"saslprep": "^1.0.3",
"semver": "^7.1.1",
"sequelize": "^5.9.3",
"semver": "^7.5.2",
"sequelize": "^6.29.0",
"serialport": "^13.0.0",
"sharp030": "npm:sharp@^0.30.0",
"sharp033": "npm:sharp@^0.33.0",
......@@ -111,19 +113,19 @@
"socket.io": "^2.4.0",
"socket.io-client": "^2.2.0",
"sqlite3": "^5.0.8",
"stripe": "^7.4.0",
"stripe": "^18.0.0",
"strong-error-handler": "^4.0.0",
"swig": "^1.4.2",
"tiny-json-http": "^7.1.2",
"ts-morph": "^15.1.0",
"ts-node": "^10.7.0",
"tsconfig-paths": "^3.14.1",
"twilio": "^3.33.0",
"typescript": "^4.8.4",
"twilio": "^5.5.2",
"typescript": "^5.7.2",
"uglify-js": "^3.6.0",
"underscore": "^1.13.4",
"unified": "^10.1.0",
"vm2": "^3.9.6",
"unified": "^11.0.5",
"vm2": "^3.10.4",
"vue": "^3.5.13",
"whatwg-url": "5.0.0",
"when": "^3.7.8",
......
;[
// TODO
// 'node_modules/fs-extra/lib/copy/copy-sync.js',
// 'node_modules/fs-extra/lib/copy/copy.js',
// 'node_modules/fs-extra/lib/copy/index.js',
......
const fs = require('fs')
const { join } = require('path')
require('./child-2')
fs.readFileSync(join(__dirname, 'asset.txt'))
const fs = require('fs')
const { join } = require('path')
require('./child-1')
require('./child-3')
fs.readFileSync(join(__dirname, 'asset.txt'))
fs.readFileSync(join(__dirname, 'asset-2.txt'))
const fs = require('fs')
const { join } = require('path')
fs.readFileSync(join(__dirname, 'style.module.css'))
const fs = require('fs')
const { join } = require('path')
require('./child-2')
fs.readFileSync(join(__dirname, 'asset.txt'))
const fs = require('fs')
const { join } = require('path')
require('./child-1')
require('./child-3')
fs.readFileSync(join(__dirname, 'asset.txt'))
fs.readFileSync(join(__dirname, 'asset-2.txt'))
const fs = require('fs')
const { join } = require('path')
fs.readFileSync(join(__dirname, 'style.module.css'))
;['package.json', 'test/unit/depth-1/child-1.js', 'test/unit/depth-1/input.js']
const fs = require('fs')
const { join } = require('path')
require('./child-2')
fs.readFileSync(join(__dirname, 'asset.txt'))
const fs = require('fs')
const { join } = require('path')
require('./child-1')
require('./child-3')
fs.readFileSync(join(__dirname, 'asset.txt'))
fs.readFileSync(join(__dirname, 'asset-2.txt'))
const fs = require('fs')
const { join } = require('path')
fs.readFileSync(join(__dirname, 'style.module.css'))
;[
'package.json',
'test/unit/depth-2/asset.txt',
'test/unit/depth-2/child-1.js',
'test/unit/depth-2/child-2.js',
'test/unit/depth-2/input.js',
]
const fs = require('fs')
const { join } = require('path')
require('./child-2')
fs.readFileSync(join(__dirname, 'asset.txt'))
const fs = require('fs')
const { join } = require('path')
require('./child-1')
require('./child-3')
fs.readFileSync(join(__dirname, 'asset.txt'))
fs.readFileSync(join(__dirname, 'asset-2.txt'))
const fs = require('fs')
const { join } = require('path')
fs.readFileSync(join(__dirname, 'style.module.css'))
;[
'package.json',
'test/unit/depth-3/asset-2.txt',
'test/unit/depth-3/asset.txt',
'test/unit/depth-3/child-1.js',
'test/unit/depth-3/child-2.js',
'test/unit/depth-3/child-3.js',
'test/unit/depth-3/input.js',
]
const pino = require('pino')
const transport = pino.transport({
targets: [
{ target: 'transport-a', level: 'error' },
{ target: 'transport-b', options: { destination: '/dev/null' } },
],
})
pino(transport)
module.exports = function pino() {}
module.exports.transport = function transport() {}
;[
'package.json',
'test/unit/pino-transport-targets/input.js',
'test/unit/pino-transport-targets/node_modules/pino/index.js',
'test/unit/pino-transport-targets/node_modules/pino/package.json',
'test/unit/pino-transport-targets/node_modules/transport-a/index.js',
'test/unit/pino-transport-targets/node_modules/transport-a/package.json',
'test/unit/pino-transport-targets/node_modules/transport-b/index.js',
'test/unit/pino-transport-targets/node_modules/transport-b/package.json',
]
const p = require('pino')
const transport = p.transport({
target: 'my-pino-transport',
})
p(transport)
module.exports = function pino() {}
module.exports.transport = function transport() {}
;[
'package.json',
'test/unit/pino-transport/input.js',
'test/unit/pino-transport/node_modules/my-pino-transport/index.js',
'test/unit/pino-transport/node_modules/my-pino-transport/package.json',
'test/unit/pino-transport/node_modules/pino/index.js',
'test/unit/pino-transport/node_modules/pino/package.json',
]
;[
'package.json',
'test/unit/pkg-dir-outside-base/input.js',
'test/unit/pkg-dir-outside-base/node_modules/some-pkg/index.js',
'test/unit/pkg-dir-outside-base/node_modules/some-pkg/package.json',
]
;[
'package.json',
'test/unit/pkg-file-outside-base/input.js',
'test/unit/pkg-file-outside-base/node_modules/some-pkg/index.js',
'test/unit/pkg-file-outside-base/node_modules/some-pkg/package.json',
]
;[
'package.json',
'test/unit/require-symlink-subdir/input.js',
'test/unit/require-symlink-subdir/subdir/another.js',
'test/unit/require-symlink-subdir/subdir/input.js',
]
......@@ -82,6 +82,10 @@ static ALLOC: turbo_tasks_malloc::TurboMalloc = turbo_tasks_malloc::TurboMalloc;
// #[case::browserify_uglify("browserify-uglify")]
#[case::class_static("class-static")]
// #[case::datadog_pprof_node_gyp("datadog-pprof-node-gyp")]
// #[case::depth_0("depth-0")]
// #[case::depth_1("depth-1")]
// #[case::depth_2("depth-2")]
// #[case::depth_3("depth-3")]
// #[case::dirname_emit("dirname-emit")]
// #[case::dirname_emit_concat("dirname-emit-concat")]
#[case::dirname_len("dirname-len")]
......@@ -134,7 +138,11 @@ static ALLOC: turbo_tasks_malloc::TurboMalloc = turbo_tasks_malloc::TurboMalloc;
#[case::null_destructure("null-destructure")]
// #[case::path_sep("path-sep")]
// #[case::phantomjs_prebuilt("phantomjs-prebuilt")]
// #[case::pino_transport("pino-transport")]
// #[case::pino_transport_targets("pino-transport-targets")]
// #[case::pixelmatch("pixelmatch")]
// #[case::pkg_dir_outside_base("pkg-dir-outside-base")]
// #[case::pkg_file_outside_base("pkg-file-outside-base")]
// #[case::pkginfo("pkginfo")]
// #[case::pnpm_symlinks("pnpm-symlinks")]
// #[case::prisma_photon("prisma-photon")]
......@@ -150,6 +158,7 @@ static ALLOC: turbo_tasks_malloc::TurboMalloc = turbo_tasks_malloc::TurboMalloc;
#[case::require_empty("require-empty")]
// #[case::require_resolve("require-resolve")]
// #[case::require_symlink("require-symlink")]
// #[case::require_symlink_subdir("require-symlink-subdir")]
// #[case::require_var_branch("require-var-branch")]
// #[case::require_wrapper("require-wrapper")]
// #[case::require_wrapper2("require-wrapper2")]
......
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