deephaven / deephaven-plugins

Deephaven Plugins
11 stars 14 forks source link

build: Hoisting rollup and esbuild optional dependencies #562

Closed bmingles closed 3 months ago

bmingles commented 3 months ago

Rollup and esbuild optional dependencies were removed from the package-lock by this PR: https://github.com/deephaven/deephaven-plugins/pull/502

Adding them back to top level optionalDependencies to ensure they are available

For reference to get this list I:

  1. used vscode file history to find the package-lock.json diff that removed the dependencies.
  2. copy / pasted the removed blocks of esbuild and rollup dependencies into a new .json file
  3. Used jq to flatten the names + versions cat myfile.json | jq 'with_entries(.value = .value.version)'
  4. Tweak / copy / pasted into optionalDependencies

Also, in case we need something like this again, jq can be used to find things like:

cat package-lock.json | \
 jq .packages | \
 jq 'with_entries(select(.key | startswith("node_modules")))' | \
 jq 'with_entries(select(.key | contains("darwin-arm64")))' | \
 jq 'with_entries(.value = .value.version)'

UPDATE: Looks like git history can be searched via git log -S for a specific term to determine which package-lock change caused the issue: e.g.

 git log -S esbuild-darwin-64

resolves #560

mattrunyon commented 3 months ago

And if you wanted the nx optionals which shouldn't be needed w/ useNx: false

"@nrwl/nx-darwin-arm64": "15.9.2",
"@nrwl/nx-darwin-x64": "15.9.2",
"@nrwl/nx-linux-arm-gnueabihf": "15.9.2",
"@nrwl/nx-linux-arm64-gnu": "15.9.2",
"@nrwl/nx-linux-arm64-musl": "15.9.2",
"@nrwl/nx-linux-x64-gnu": "15.9.2",
"@nrwl/nx-linux-x64-musl": "15.9.2",
"@nrwl/nx-win32-arm64-msvc": "15.9.2",
"@nrwl/nx-win32-x64-msvc": "15.9.2"