-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Rename prisma7 package to @prisma/prisma7 #30002
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,8 +60,20 @@ async function main() { | |
|
|
||
| console.log('🎠 Preparing e2e tests') | ||
|
|
||
| let allPackageFolderNames = await fs.readdir(path.join(monorepoRoot, 'packages')) | ||
| allPackageFolderNames = allPackageFolderNames.filter((p) => !p.includes('DS_Store')) | ||
| const packagesDir = path.join(monorepoRoot, 'packages') | ||
| const allPackageFolderNames = (await fs.readdir(packagesDir)).filter((folderName) => | ||
| existsSync(path.join(packagesDir, folderName, 'package.json')), | ||
| ) | ||
| const allPackageFolders = allPackageFolderNames.map((folderName) => path.join(packagesDir, folderName)) | ||
| const allPkgJsonPaths = allPackageFolders.map((packageFolder) => path.join(packageFolder, 'package.json')) | ||
| const allPkgJson = allPkgJsonPaths.map( | ||
| (packageJsonPath) => | ||
| require(packageJsonPath) as { | ||
| name: string | ||
| dependencies?: Record<string, string> | ||
| }, | ||
|
Comment on lines
+69
to
+74
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
pnpm typecheckRepository: prisma/prisma Length of output: 13232 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- target file ---'
sed -n '1,115p' packages/client/tests/e2e/_utils/run.ts
printf '%s\n' '--- package and compiler configuration ---'
cat package.json
find . -maxdepth 3 \( -name 'tsconfig*.json' -o -name 'package.json' \) -print | sort | head -80
rg -n '"typecheck"|strictNullChecks|strict" packages/client package.json tsconfig*.json . --glob 'tsconfig*.json' --glob 'package.json' --glob '!node_modules' | head -120Repository: prisma/prisma Length of output: 12866 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- client package scripts ---'
cat packages/client/package.json
printf '%s\n' '--- client compiler settings ---'
cat packages/client/tsconfig.json
cat packages/client/tsconfig.build.json 2>/dev/null || true
printf '%s\n' '--- workspace typecheck scripts ---'
rg -n '"typecheck"|strictNullChecks|strict' --glob 'package.json' --glob 'tsconfig*.json' packages pnpm-workspace.yaml turbo.json
printf '%s\n' '--- available TypeScript compiler ---'
command -v tsc || true
test -x node_modules/.bin/tsc && node_modules/.bin/tsc --version || trueRepository: prisma/prisma Length of output: 13559 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- inherited workspace compiler settings ---'
cat tsconfig.json
printf '%s\n' '--- exact-expression compiler probe ---'
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
cat >"$tmpdir/probe.ts" <<'TS'
declare const allPkgJson: Array<{
name: string
dependencies?: Record<string, string>
}>
declare const i: number
declare const key: string
for (const key of Object.keys(allPkgJson[i].dependencies ?? {})) {
allPkgJson[i].dependencies[key] = `/tmp/${key}`
}
TS
tsc --noEmit --strictNullChecks --skipLibCheck "$tmpdir/probe.ts" 2>&1 || true
printf '%s\n' '--- narrowed-expression compiler probe ---'
cat >"$tmpdir/probe-fixed.ts" <<'TS'
declare const allPkgJson: Array<{
name: string
dependencies?: Record<string, string>
}>
declare const i: number
const packageJson = allPkgJson[i]
const dependencies = packageJson.dependencies
if (dependencies !== undefined) {
for (const key of Object.keys(dependencies)) {
dependencies[key] = `/tmp/${key}`
}
}
TS
tsc --noEmit --strictNullChecks --skipLibCheck "$tmpdir/probe-fixed.ts"Repository: prisma/prisma Length of output: 1036 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- inherited strictness ---'
cat tsconfig.utils.typecheck.json
printf '%s\n' '--- exact-expression compiler probe ---'
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
cat >"$tmpdir/probe.ts" <<'TS'
declare const allPkgJson: Array<{
name: string
dependencies?: Record<string, string>
}>
declare const i: number
for (const key of Object.keys(allPkgJson[i].dependencies ?? {})) {
allPkgJson[i].dependencies[key] = `/tmp/${key}`
}
TS
tsc --ignoreConfig --noEmit --strictNullChecks --skipLibCheck "$tmpdir/probe.ts" 2>&1 || true
printf '%s\n' '--- narrowed-expression compiler probe ---'
cat >"$tmpdir/probe-fixed.ts" <<'TS'
declare const allPkgJson: Array<{
name: string
dependencies?: Record<string, string>
}>
declare const i: number
const packageJson = allPkgJson[i]
const dependencies = packageJson.dependencies
if (dependencies !== undefined) {
for (const key of Object.keys(dependencies)) {
dependencies[key] = `/tmp/${key}`
}
}
TS
tsc --ignoreConfig --noEmit --strictNullChecks --skipLibCheck "$tmpdir/probe-fixed.ts"Repository: prisma/prisma Length of output: 481 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
cat tsconfig.build.bundle.jsonRepository: prisma/prisma Length of output: 2925 Narrow
🤖 Prompt for AI AgentsSource: Coding guidelines |
||
| ) | ||
| const packedPackageFilename = (packageName: string) => `${packageName.replace(/^@/, '').replace('/', '-')}-0.0.0.tgz` | ||
|
|
||
| const prismaTmpDir = path.join(os.homedir(), '.local', 'share', 'prisma-tmp') | ||
|
|
||
|
|
@@ -70,16 +82,13 @@ async function main() { | |
| await $`pnpm -r exec cp package.json package.copy.json` | ||
|
|
||
| // we prepare to replace references to local packages with their tarballs names | ||
| const localPackageNames = [...allPackageFolderNames.map((p) => `@prisma/${p}`), 'prisma', 'prisma7'] | ||
| const allPackageFolders = allPackageFolderNames.map((p) => path.join(monorepoRoot, 'packages', p)) | ||
| const allPkgJsonPaths = allPackageFolders.map((p) => path.join(p, 'package.json')) | ||
| const allPkgJson = allPkgJsonPaths.map((p) => require(p)) | ||
| const localPackageNames = allPkgJson.map((packageJson) => packageJson.name) | ||
|
|
||
| // replace references to unbundled local packages with built and packaged tarballs | ||
| for (let i = 0; i < allPkgJson.length; i++) { | ||
| for (const key of Object.keys(allPkgJson[i].dependencies ?? {})) { | ||
| if (localPackageNames.includes(key)) { | ||
| allPkgJson[i].dependencies[key] = `/tmp/${key.replace('@prisma/', 'prisma-')}-0.0.0.tgz` | ||
| allPkgJson[i].dependencies[key] = `/tmp/${packedPackageFilename(key)}` | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -121,11 +130,10 @@ async function main() { | |
| const dockerVolumeOptions = process.platform === 'linux' ? ':z' : '' | ||
| const dockerVolume = (source: string, target: string) => `${source}:${target}${dockerVolumeOptions}` | ||
| const dockerVolumes = [ | ||
| dockerVolume(`${prismaTmpDir}/prisma-0.0.0.tgz`, '/tmp/prisma-0.0.0.tgz'), // hardcoded because folder doesn't match name | ||
| dockerVolume(`${prismaTmpDir}/prisma7-0.0.0.tgz`, '/tmp/prisma7-0.0.0.tgz'), | ||
| ...allPackageFolderNames | ||
| .filter((p) => p !== 'prisma7') | ||
| .map((p) => dockerVolume(`${prismaTmpDir}/prisma-${p}-0.0.0.tgz`, `/tmp/prisma-${p}-0.0.0.tgz`)), | ||
| ...allPkgJson.map(({ name }) => { | ||
| const filename = packedPackageFilename(name) | ||
| return dockerVolume(`${prismaTmpDir}/${filename}`, `/tmp/${filename}`) | ||
| }), | ||
| dockerVolume(path.join(monorepoRoot, 'packages', 'engines'), '/engines'), | ||
| dockerVolume(path.join(monorepoRoot, 'packages', 'client'), '/client'), | ||
| dockerVolume(e2eRoot, '/e2e'), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.