1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-19 19:04:01 +00:00
Commit Graph

2 Commits

Author SHA1 Message Date
addisonbeck
2503b37f2c fix: Add rootDir to all 15 library project.json configs and update package.json paths
- Add 'rootDir: libs/LIBRARY_NAME/src' to all @nx/js:tsc executor build options
- Update package.json main/types from 'dist/index.js' to 'index.js' for all libraries
- Fixes systematic bug where build output had nested src/ structure but package.json pointed to non-existent dist/ paths
- Affects all Tier 1-3 libraries: storage-core, guid, serialization, user-core, logging, client-type, messaging, messaging-internal, state, state-internal, core-test-utils, storage-test-utils, state-test-utils, assets, nx-plugin
- Resolves 'Cannot find module' TypeScript errors for library imports
- Implements Phase 2 systematic fix from rootDir configuration specification
2025-09-11 14:06:05 -04:00
Addison Beck
e8224fdbe3 feat(nx): add basic-lib generator for streamlined library creation (#14992)
* feat(nx): add basic-lib generator for streamlined library creation

This adds a new nx-plugin library with a generator for creating "common" type
Bitwarden libs. It is set up to accept a lib name, description, team, and
directory. It then
- Creates a folder in the directory (default to libs)
- Sets up complete library scaffolding:
  - README with team ownership
  - Build, lint and test task configuration
  - Test infrastructure
- Configures TypeScript path mapping
- Updates CODEOWNERS with team ownership
- Runs npm i

This will make library creation more consistent and reduce manual boilerplate setup.

The plugin design itself was generated by `npx nx g plugin`. This means we
used a plugin to generate a plugin that exports generators. To create our
generator generator, we first needed a generator.

* fix(dirt/card): correct tsconfig path in jest configuration

Fix the relative path to tsconfig.base in the dirt/card library's Jest config.
The path was incorrectly using four parent directory traversals (../../../../)
when only three (../../../) were needed to reach the project root.

* chore(codeowners): clarify some nx ownership stuff
2025-06-05 14:20:23 -04:00