Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
Reino Muhl f47d120d71
feat(libs): convert libs/* to esbuild and swc/jest
Because:

- ts-jest is consuming too much memory during unit test execution

This commit:

- Replace ts-jest with @swc/jest, which has better memory utilization
- Replace Nx TSC build executor with Nx esbuild build executor, for better performance.
- Reduce size of unit-test job instance size from large back to medium+

Closes #FXA-9879
2024-06-27 15:28:55 -04:00
Julian Poyourow 473ba056bb
feat(paypal): Add paypal repository
Because:

* We want to be able to interact with the paypalCustomer table from the
  new libs structure

This commit:

* Adds a paypalCustomer repository

Closes FXA-8888
2024-03-19 09:17:01 -07:00
Reino Muhl 2df7ca494a
chore(nx): upgrade to nx 18
Because:

* Want to migrate Nx to latest

This commit:

* Migrate nx to 18 using nx cli migrate latest
* Readd a few dev dependancies back into packages/**/package.json
  * Behavior of `npx nx...` commands seems to have changed, resulting in
    multiple "command not found: <library>" errors, where <library>
    refers to libaries used in packages/**/package.json scripts, such as
    tailwindcss, tsc-alias, nx, etc.
* Updates nx cache location for Circle CI

Closes #FXA-8880
2024-02-12 09:01:00 -05:00
Reino Muhl 70ebacc772
fix(nx): remove nx prject rootDir and main changes
Because:

* Manual changes were needed to all nx libraries to ensure expected
  TypeScript build and development intellisense behavior.

This commit:

* Removes the "rootDir" build option added to all libraries, to allow
  for relative paths. This is no longer necessary since issues using
  TypeScript path aliases have been resolved.
* Removes changes to "main" build option, which ensured the built
  version of package.json had the correct path to the main index.js.

Closes #
2023-10-16 13:32:53 -04:00
dschom d96797ae6a
task(CI): Improve nx caching for CI pipelines
Because:
- Not all CI operations where taking advantage of NX caches

This Commit:
- Adjusts nx.json config to ensure correct caching behavior
- Adjusts nx.json config to ensure proper target chains. ie build is dependent on pre-build
- Uses nx to directly run integration tests
- Uses nx to directly run unit tests
- Phases out dependency on generated .list files
- Ensures 'start up' for services for functional tests is done with nx and uses nx caches.
- Creates nx tags to facilitate test commands
- Fixes linter errors encountered
- Updates docker images to nx for builds
- Updates nx ignore files
2023-08-29 11:19:54 -07:00
Julian Poyourow d65c9f9cc7
feat(shared): contentful client
Because
- We need a reusable client for accessing contentful

This Commit
- Adds a contentful client with automated codegen
- Creates a reusable query system

Closes FXA-7501
2023-08-16 16:27:12 +00:00
Reino Muhl e2ecdbd46b
Merge pull request #15662 from mozilla/fxa-8119-ts-paths-alias-imports
feat(libs): allow packagename-based imports
2023-08-08 16:52:30 -04:00
Reino Muhl 26537a484e
feat(libs): allow packagename-based imports
Because:
- we want to be able to use packagename based imports, defined in
  tsconfig.base.json paths, throughout the repo.

This commit:
- Adds a workaround fix to libs/**/project.json > main properties to
  ensure that the built dist/libs/**/.package.json has the correct
  main property.
- Upgrades esbuild-register to latest version, which includes
  tsconfig path resolution.
- Adds tsconfig-paths to auth-server mocha based tests.
- Adds various workarounds to fxa-graphql-api including the following
  - Adds paths from `tsconfig.base.json` to `tsconfig.build.json`
    excluding the extension.
  - Add pathToModuleNameMapper to all jest*.config.js
  - Add build step before tests are run
2023-08-07 14:01:05 -04:00
Dan Schomburg 5571e80284
Merge pull request #15656 from mozilla/change-test-target-for-nx-projects
task(many): Switch nx test target to be test-unit
2023-08-04 10:00:20 -07:00
dschom 535498214a
task(many): Switch nx test target to be test-unit
Because:
- The CI already targets test-unit
- We want to draw a distinction between unit and integration tests.

This Commit:
- Renames "test" to "test-unit" in lib packages.
- Sets up CI to run integration tests on 'libs' folder packages
- Adds tags to nx projects in libs folder
2023-08-03 15:38:16 -07:00
Ben Bangert 1ca77c5ffd
fix: add remaining rootDir for build to complete
Because:

* The build was failing due to missing rootDir in the project.json files.

This commit:

* Adds the missing rootDir to the project.json files.
2023-08-03 13:54:18 -07:00
Ben Bangert a1e6cbe52d
feat: polsih error refactor
Because:

* We had some last minute tweaks to the error arrangement.

This commit:

* Moves the error class to the library using it and inherits from a
  shared base error.
2023-08-02 16:24:29 -07:00
Bianca Danforth a9dc3372fe
feat(shared): create error library with initial error classes
Because:

* We want an error library to generalize error handling across all new integrated libraries.

This commit:

* Generates a new JS library with nx called shared-error that exports a few error classes.
* Ports the PayPalClientError to the new library as an example error (renamed to PayPalNVPError with PayPalClientError becoming a MultiError composed of one or more PayPalNVPErrors), refactoring the multiple error handling logic to a new helper.

Closes #FXA-7656
2023-08-02 11:26:54 -04:00