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
Because:
- Starting and restarting payments-next takes a long time due to always
building the app first, which isn't necessary during development.
- When changes are made to NestApp or its dependencies, these are not
hot reloaded by Next.js, requiring a full Next.js restart.
This commit:
- Adopt Nx plugin for Next.js which more closely aligns with Next.js
standard dev commands.
- Retained Nx Next.js executors for build, since it more closely fits
into the current FxA build and deploy CI logic.
- Added a watcher to NestApp which calls a NestApp restart api, only
available in development, to restart the NestApp on any changes.
- Adds a function to get the NestApp, instead of a const, thus ensuring,
in dev mode, the latest NestApp is always returned.
Closes #FXA-9706
Because:
- We want to let RPs know when users opt out of metrics collection
- We want to let RPs know when users opt in to metrics collection
This Commit:
- Ports the notifier code over to nx libs from auth server
- Ports other supporting libraries from fxa-shared to nx libs
- MozLoggerService
- Sentry
- Metrics (ie statsd)
- Updates graphql to emit a 'metricsChange' event when users toggle their 'Help improve Mozilla accounts' option in settings.
- Adds support for the metricsChanged event to the fxa-event-broker
Because:
* Call CartService.setupCart from payments-next via server action.
This commit:
* Extracts fxa-geodb into libs/* library
* Updates CartService to include GeodbManager
* Call setupCart from payments-next
Closes #FXA-8892
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
Because:
- We are removing tokens from our source
- Even those that are just for dev purposes
This Commit:
- Removes the accessToken from the default nx tasksRunnerOptions.
Note: Some instructions will be added for developers who want to an access token to speed up builds locally.
Because:
* we want to employ the factory pattern for mocking testing data
This commit:
* adds factory functions for several stripe objects
Closes #FXA-8311
Because:
* Create the initial work for the Checkout page as a starting point and
example for the rest of the SP3 components and pages.
This commit:
* Adds the payments/next/ui Next.js library.
* Move Header JSX into layout.tsx and remove ExampleHeader component.
* Add RSC PurchaseDetails, using JSX from SP2.5 PlanDetails component.
* Add RSC TermsAndPrivacy component
* Add various stubs functions for illustration purposes. These will be
replaced with actual implementations in future tickets.
* Cart fetch
* Contentful fetch
* Translation using @fluent/bundle
Closes FXA-8133
Because:
* We want to include Storybook in 3.0.
This commit:
* Ensures Storybook component loads as expected.
* Ensures shared Tailwind styles can be used in payments-next and works with hot-reloading.
* Ensures the build script executes without any errors.
Closes FXA-7503
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
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
Because:
- We want to lock down our gql queries as part of good security practices.
This Commit:
- Creates task that extracts existing gql queries from our code
- Applies middleware that checks a allowlist of extracted queries.
- Creates a 403 if the query is not in the allowlist
- Makes all gql parsable by extraction utility. The extraction utility doesn't support string placeholders. e.g. gql` Account { ${ACCOUNT_FIELDS} }`
- Moves all the gql in the admin server into .ts files. Again for consistency and extraction utility support.
- Cleans up some config references at startup
- Adds nx config for extraction & copy tasks
Because:
* We want to introduce nx to the repository
This commit:
* Adds nx with working builds
Closes: FXA-7341
Co-authored-by: dschom <dschomburg@mozilla.com>