Skip to content

Commit

Permalink
Amend pnpm_lock_sync_test to fail anytime pnpm is sad (not just if th…
Browse files Browse the repository at this point in the history
…e lockfile is out of date)

Move pnpm test into presubmit (it breaks out of the sandbox)

Amend pnpm lock sync test accounting for upstream fix.

pnpm/pnpm#6913 (comment)



Revert all changes to package.json since lockfile test was broken.
  • Loading branch information
Zemnmez committed Aug 18, 2023
1 parent 724e421 commit bd6169b
Show file tree
Hide file tree
Showing 5 changed files with 299 additions and 333 deletions.
12 changes: 0 additions & 12 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,4 @@ bin.renovate_config_validator_test(
data = ["renovate.json"],
)

# This test is necessitated by several times when tooling has
# updated package.json, but not updated pnpm-lock.yaml.
sh_test(
name = "pnpm_lockfile_sync",
data = ["pnpm-lock.yaml", "package.json", ":pnpm"] + glob(["patches/**/*"]),
srcs = [ "pnpm_lock_sync_test.sh" ],
env = {
"PNPM_BINARY": "$(location :pnpm)"
}
)


npm_link_all_packages(name = "node_modules")
18 changes: 17 additions & 1 deletion ci/presubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const cmd = new Command('presubmit')
'--skip-bazel-tests',
`${
'Skip doing the traditional (and very important!) bazel presubmit tests. ' +
'Typically this is just useful for testing pulumi deploys.'
'Typically this is just useful for testing pulumi deploys.' +
"Skips the other tests that wouldn't fit into bazel, also."
}`,
false
)
Expand Down Expand Up @@ -45,6 +46,21 @@ const cmd = new Command('presubmit')
return ok();
})
);

// validate the pnpm lockfile.
await new Promise<void>((ok, err) =>
child_process
.spawn('bazel', [
'run',
'//:pnpm',
'--',
'--frozen-lockfile',
'--lockfile-only',
])
.on('close', code =>
code != 0 ? err(`exit ${code}`) : ok()
)
);
}

// attempt a deploy of pulumi to staging, and tear it down.
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"@fortawesome/fontawesome-svg-core": "6.4.2",
"@fortawesome/free-solid-svg-icons": "6.4.2",
"@fortawesome/react-fontawesome": "0.2.0",
"@microsoft/api-documenter": "7.22.33",
"@microsoft/api-extractor": "7.36.4",
"@microsoft/api-documenter": "7.22.32",
"@microsoft/api-extractor": "7.36.3",
"@pulumi/aws": "5.42.0",
"@pulumi/awsx": "1.0.4",
"@pulumi/pulumi": "3.78.1",
"@pulumi/pulumi": "3.77.1",
"@schemastore/package": "0.0.10",
"@swc/cli": "0.1.62",
"@testing-library/react": "14.0.0",
Expand All @@ -31,15 +31,15 @@
"@types/glob": "8.1.0",
"@types/jest": "29.5.3",
"@types/mime": "3.0.1",
"@types/node": "20.4.9",
"@types/react": "18.2.19",
"@types/node": "20.4.8",
"@types/react": "18.2.18",
"@types/react-dom": "18.2.7",
"@types/sharp": "0.32.0",
"@types/svgo": "3.0.0",
"@types/tmp": "0.2.3",
"@types/uuid": "9.0.2",
"@typescript-eslint/eslint-plugin": "6.3.0",
"@typescript-eslint/parser": "6.3.0",
"@typescript-eslint/eslint-plugin": "6.2.1",
"@typescript-eslint/parser": "6.2.1",
"bcryptjs": "2.4.3",
"chalk": "5.3.0",
"classnames": "2.3.2",
Expand All @@ -49,10 +49,10 @@
"d3-axis": "3.0.0",
"d3-scale": "4.0.2",
"diff": "5.1.0",
"esbuild": "0.19.1",
"esbuild": "0.18.18",
"esbuild-css-modules-plugin": "2.7.1",
"eslint": "8.47.0",
"eslint-config-next": "13.4.13",
"eslint-config-next": "13.4.10",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react": "7.33.1",
Expand All @@ -66,16 +66,16 @@
"mime": "3.0.0",
"minimist": "1.2.8",
"module-alias": "2.2.3",
"next": "13.4.13",
"next": "13.4.10",
"patch-package": "8.0.0",
"prettier": "3.0.1",
"puppeteer": "21.0.3",
"puppeteer": "21.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-router": "6.14.2",
"react-router-dom": "6.14.2",
"react-spring": "9.7.2",
"regenerator-runtime": "0.14.0",
"regenerator-runtime": "0.13.0",
"renovate": "^36.0.0",
"sharp": "0.32.4",
"stylelint": "15.10.2",
Expand Down

0 comments on commit bd6169b

Please sign in to comment.