Skip to content
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

Initial Research #3

Open
1 task
gioragutt opened this issue May 21, 2022 · 0 comments
Open
1 task

Initial Research #3

gioragutt opened this issue May 21, 2022 · 0 comments

Comments

@gioragutt
Copy link
Owner

gioragutt commented May 21, 2022

Tooling in each repo

nx-packages and nx-plugins are repos internal to my company. Both are packages workspaces, the plugins repo is synced-versions, and the packages repo is independent.


nx-packages
File Name Purpose Notes
tools/check-lock-files.js Ensures that there’s no lock file but yarn.lock, and ensures that yarn.lock does not reference the local registry  
tools/check-versions.ts Checks library package json files, and dependencies that have newer versions Contains a check to ignore libraries that are part of the repo
tools/depcheck/discrepancies.ts Looks for dependencies in project package.json files that do not satisfy the root package.json (or vice versa)  
tools/depcheck/missing.ts Uses the depcheck module to find missing imports in projects  
tools/depcheck/index.ts CLI entry point for running the discrepancies/missing checks are reporting those Contains a check to ignore libraries that are part of the repo
tools/library-publishing-plugin.js NX Plugin that adds version/publish targets to packages Only relevant for independent-versions libraries
tools/local-registry.sh Manages setting-up/tearing down and configuring package managers to work with verdaccio  
tools/local-registry/config.yml Verdaccio config our configs might be invalid since it still only references @nrwl packages as a special case, something that we might be missing out
tools/package.ts Builds packages and updates the built package.json for local or prod publishing  
tools/scripts/publish.mjs Script generated by NX itself to be a good default script for publishing repositories  
tools/tsconfig.scripts.json tsconfig for .ts scripts  
tools/tsconfig.tools.json tsconfig generated by NX, difference is "rootDir": "*"  
tools/workspace-utils.ts Utility module that exports metadata about projects in the repository for other scripts  

nx-plugins
File Name Purpose Notes
tools/check-lock-files.js Same as in nx-packages  
tools/check-versions.ts Intended for use in plugins which have a lib/utils/versions.ts package. Checks for newer versions of packages specified there. Requires external configuration to differentiate between scoped packages and other packages.
tools/depcheck/discrepancies.ts
tools/depcheck/index.ts
tools/depcheck/missing.ts
Should be the same as in nx-packages. TODO: diff the code
tools/find-affected.js Basically a hack until affected --tags is added Should be a reusable github action
tools/local-registry.sh
tools/local-registry/config.yml
Same as in nx-packages  
tools/nx-release.js Script to release all packages in a synced-version workspace  
tools/package.js Should be more or less the same as in nx-packages, there is definitely a difference tho. CHECKITOUT
tools/publish.sh Utility script of nx-release.js to publish all the packages  
tools/tsconfig.scripts.json
tools/tsconfig.tools.json
Same as in nx-packages

  • Add same summary for the NX repo itself
nrwl/nx
File Name Purpose Notes

What’s the scope of the CLI

Provides tooling for developing, validating, and optionally building & publishing packages in an NX workspace.

  • Differentiation should be done for synced-version and independent-version.

TODO: Check how the semver plugin works for synced-version. Perhaps nx-release.js is deprecated.

  • Take on the local-registry utility, improve it, add a status utility, etc.

  • check-version.ts should be consolidated to a single tool and have it check plugins and normal libraries simultaneously.

  • Perhaps check-lock-files should be adjusted to allow different package managers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant