* [PAM-121] Move shared PAM code to bit-pam and bit-pam-components
Creates two licensed libs owned by team-pam-dev and moves the shared PAM
code into them from bit-web so other clients can consume it:
- bitwarden_license/bit-pam (@bitwarden/bit-pam): framework-free
abstractions, helpers, date formatting and SDK services, usable from the
browser background. ESLint keeps Angular and the UI libraries out of it.
- bitwarden_license/bit-pam-components (@bitwarden/bit-pam-components): the
shared components, pipes, confirm dialogs and Angular-injected services.
Each lib exposes a single barrel. Split out of #22430 to reduce its size;
no behavioural changes.
* [PAM-121] Run Chromatic on bit-pam-components changes
* [PAM-121] Run prettier
* Add @bitwarden/storybook lib with feature-flags addon
Introduce a dedicated @bitwarden/storybook library housing Storybook
addons and utilities.
feature-flags addon:
- Manager-side "Feature Flags" panel listing every boolean flag from the
FeatureFlag enum; toggles write to a Storybook global.
- Preview-side mock ConfigService whose getFeatureFlag$ values are driven
by that global (reactive, so toggles update stories live).
- Flag catalog seeded into globals so the manager bundle never imports
@bitwarden/* (esbuild can't resolve those aliases).
- featureFlagModes() helper for opt-in Chromatic on/off snapshot modes.
- Documentation/Feature Flags MDX page describing panel + modes usage.
Also:
- Move .storybook/format-args-for-code-snippet into the lib and repoint
the 19 component stories to import from @bitwarden/storybook.
- Enable jsx ("react") in tsconfig.base.json for the manager panel (.tsx);
the Storybook manager builder emits the classic runtime.
- .storybook wiring: preview registers the decorator + seeds globals,
manager loads the panel by relative path.
package-lock.json also picks up npm's normalization of a few pre-existing
entries on main (readdirp dedupe, encoding removal) alongside the new
workspace registration.
* Add enabledFlags helper for per-story flag state
- enabledFlags(...flags) builds a story-level `globals` override so one
story can render with a flag on and another with it off.
- featureFlagModes now reuses enabledFlags for a single source of truth.
- Document the per-story pattern in the Feature Flags MDX.
* Fix CI failures for the feature-flags addon
- Decorator: skip providing the mock ConfigService when a story already
provides one at the application root (applicationConfig). Fixes the
danger-zone story crash "Cannot mix multi providers and regular
providers" — it registers ConfigService as `multi: true`.
- Lib jest: set isolatedModules in tsconfig.spec.json so ts-jest
transpiles without type-checking; its node10 resolution can't read
@storybook/angular's exports-based types (typecheck is covered by tsc).
- Reformat 5 component stories that were left prettier-dirty after the
import repoint (pre-commit runs prettier before eslint's import sort).
* Remove comments from tsconfig.spec.json and manager.js
Add a new libs/pam feature library for Privileged Access Management,
generated via the basic-lib Nx generator.
- Register the "pam" team in the basic-lib generator (schema enum,
interactive prompt, and the @bitwarden/team-pam-dev CODEOWNERS handle)
- Generate libs/pam with standard structure and a placeholder spec
- Wire up tsconfig.base.json path, CODEOWNERS, and root jest.config.js
* prune desktop packages
* Fix @napi-rs/cli version mismatch in desktop napi workspace
Aligns package.json declaration with the locked version (3.2.0) to
resolve npm workspace inconsistency that was blocking ng update.
* update Storybook to v10
* update Angular to v21
* override jest in ng builder
* Add jest-environment-jsdom as explicit dependency
Previously installed as a side effect of a jest@29 override; removing
that override caused it to disappear from node_modules.
* Add .claude/worktrees/ to .gitignore
* Restore @napi-rs/cli to 3.5.1 to match main
* Pin jest-environment-jsdom to 29.7.0 and add to renovate config
* Override jest-environment-jsdom to 29.7.0 in build-angular context
* Add isolatedModules to libs/subscription tsconfig.spec.json to fix Angular 21 module resolution
* Change moduleResolution to bundler for Angular 21 subpath export compatibility
* Add isolatedModules to Angular libs with old spec tsconfig pattern
* Disable emitDecoratorMetadata in spec tsconfigs with isolatedModules
* Fix HostListener event parameter types for Angular 21 compiler strictness
* Revert accidental change to access-selector spec
* Remove accidentally generated desktop package-lock.json
* Fix type-only imports/exports caught by Rolldown in Storybook v10/Vite v8
* fix vault-wrapper type error from Angular 21 stricter generic inference
ngComponentOutlet accepts Type<unknown>; annotate computed() explicitly
since VaultComponent is generic and VaultOrigComponent is not, preventing
TypeScript from inferring a compatible union constructor type.
* Fix kitchen-sink interaction tests for Storybook v10
Replace fire-and-forget navigateTo + synchronous getByRole with
navigateAndWaitFor<T>, which sets the hash and retries the ready
callback via waitFor. Storybook v10 starts play functions before
Angular's initial router navigation completes, so synchronous DOM
queries after navigation were failing intermittently.
* Provide ZoneJS change detection scheduler for Storybook stories
Angular 21 no longer sets up the ZoneJS change detection scheduler by
default in bootstrapApplication. Storybook's Angular renderer uses
bootstrapApplication internally and does not add provideZoneChangeDetection
automatically, so Default CD components relying on zone.js to trigger
re-renders after async operations were not updating before Chromatic
snapshots.
* Wait for dialog/side nav to render before Chromatic snapshot
After userEvent.click the dialog and side nav open asynchronously.
Without an explicit waitFor, Chromatic captures the snapshot before the
resulting UI state is present.
* Fix kitchen-sink waitFor: re-query side nav button, use querySelector for dialog
- openSideNav: re-query the toggle button inside waitFor to avoid reading
a stale DOM reference after Angular re-renders the element post-click
- SimpleDialogOpen / VirtualScrollBlockingDialog: replace getByRole("dialog")
with querySelector("cdk-dialog-container") to avoid testing-library's
visibility check failing on a momentarily inaccessible overlay element
* Revert kitchen-sink stories to main
* Bump Angular, Storybook, and ng-select to latest patch versions
* Trigger pre-commit hooks on merge
* Regenerate package-lock.json with --force to fix npm ci sync
* add notification handler for auto confirm
* add missing state check
* fix test
* isolate angular specific code from shared lib code
* clean up
* use autoconfirm method
* fix test
* Add creationDate of account to AccountInfo
* Added initialization of creationDate.
* Removed extra changes.
* Fixed tests to initialize creation date
* Added helper method to abstract account initialization in tests.
* More test updates.
* Linting
* Additional test fixes.
* Fixed spec reference
* Fixed imports
* Linting.
* Fixed browser test.
* Modified tsconfig to reference spec file.
* Fixed import.
* Removed dependency on os. This is necessary so that the @bitwarden/common/spec lib package can be referenced in tests without node.
* Revert "Removed dependency on os. This is necessary so that the @bitwarden/common/spec lib package can be referenced in tests without node."
This reverts commit 669f6557b6.
* Updated stories to hard-code new field.
* Removed changes to tsconfig
* Revert "Removed changes to tsconfig"
This reverts commit b7d916e8dc.
This change eliminates the circular dependency between messaging and messaging-internal libraries by merging them into a single messaging library.
Previously, messaging-internal imported from @bitwarden/messaging while messaging tried to import from @bitwarden/messaging-internal, creating an unresolvable circular dependency. This also violated Nx best practices by using cross-library file includes in tsconfig.lib.json.
Changes made:
- Moved all messaging-internal code (SubjectMessageSender, helpers, tests) into libs/messaging/src/
- Updated all imports to use relative paths instead of @bitwarden/messaging imports
- Removed the entire messaging-internal library and its configuration files
- Updated external references in apps/browser to import from @bitwarden/messaging
- Fixed libs/messaging/tsconfig.lib.json to use standard src/**/*.ts pattern
- Updated libs/common internal.ts to re-export from messaging instead of messaging-internal
The messaging library now exports both public APIs and internal implementations, which is a cleaner architecture than maintaining two separate libraries with circular dependencies.
Fixes rootDir configuration issues identified in the Nx library systematic fix project.
* create the pricing library
* Create pricing-card.component
* Refactor the code
* feat: Add pricing card component library
* Fix the test failing error
* Address billing pr comments
* feat: Add Storybook documentation and stories for pricing-card component
* Fix some ui feedback
* Changes from the display and sizes
* feat(billing): refactor pricing card with flexible title slots and active badge
* Enhance pricing card with flexible design and button icons
* refactor: organize pricing card files into dedicated folder
* Complete pricing card enhancements with Chromatic feedback fixes
* refactor base on pr coments
* Fix the button alignment
* Update all the card to have the same height
* Fix the slot issue on the title
* Fix the Lint format issue
* Add the header in the stories book
* feat: create separate bit licensed browser
* feat: refactor webpack config
* fix: mv2 build not working
* feat: add bit versions of all commands
* feat: add bit CI builds
* fix: scss missing from build
* create libs/assets
* treeshake lib and filter out non-icons from icon story
* update docs
* fix icon colors in browser and desktop
* better name for vault icon
* move illustrations
* 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