Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: memoize npmVersion for devDependencies
The current iteration of the publish_packages script is very slow. The main culprit is the `npm view` command, which is executed for each internal dependency and devDependency of every standalone package. This command is slow because it requires a network request to the npm registry. This commit adds a memoization layer to the script, which caches the results of the `npm view` command. In doing so, we have to separate the memoization cache for dependencies and devDependencies because the topological sort of the dependency graph is performed only for production dependencies and thus a first call to `npm view` for a devDependency is not guaranteed to reflect the latest version of the dependency that was published to the npm registry during the current execution of the script.
- Loading branch information