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

235 Коммитов

Автор SHA1 Сообщение Дата
Valerie Pomerleau 856980609e
chore(deps): resolve protobufjs to versions that don't allow prototype pollution
Because:

* Versions of protobufjs <6.11.4 and <7.2.4 are causing security alerts

This commit:

* Resolve protobufjs version 6 to use v6.11.4 or newer
* Resolve protobufjs version 7 to use v7.2.4 or newer
* Ran yarn set resolution manually to force yarn.lock update

Co-authored-by: Ben Bangert <ben@groovie.org>
2023-09-27 10:26:32 -07:00
Ben Bangert 1924d154ec
chore(deps): bump faker, nx, and next
Because:

* We want to keep up to date with the latest versions.

This commit:

* Updates the faker, nx, and next dependencies.
2023-09-26 19:26:14 -07:00
Barry Chen e1776b6bd2
feat(metrics): add Glean to fxa-settings and emit reg_view
Because:
 - we want to use Glean in fxa-settings

This commit:
 - integrates glean.js into fxa-settings
 - emits the reg_view event
2023-09-25 10:05:07 -05:00
Ben Bangert 27baba65a6
chore: update next to 13.5 and polish heartbeat return
Because:

* We want to use the newer Next.js.
* We want to use proper Next.js JSON return handling.

This commit:

* Updates to Next.js 13.5.1.
* Updates the heartbeat routes to use the new JSON return handling.
2023-09-19 11:18:09 -07:00
Ben Bangert e97fd383b8
feat: add nestJS service loading to payments-next
Because:

* We want to be able to call server-side logic with our business classes
  directly from the nextJS app before rendering on the server.

This pull request:

* Adds a NestJS application context to the NextJS app that can be used
  to load services and call methods on them.
2023-09-14 09:45:37 -07:00
Reino Muhl 3894a65527
feat(next): payments-next initial work
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
2023-09-12 14:24:39 -04:00
Meghan Sardesai a999afd748
chore(next): add Storybook to NextJS setup
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
2023-09-11 17:26:30 -04:00
dependabot[bot] afe3a46fd8
chore(deps-dev): bump nx-cloud from 16.2.0 to 16.4.0
Bumps [nx-cloud](https://github.com/nrwl/nx) from 16.2.0 to 16.4.0.
- [Release notes](https://github.com/nrwl/nx/releases)
- [Commits](https://github.com/nrwl/nx/compare/16.2.0...16.4.0)

---
updated-dependencies:
- dependency-name: nx-cloud
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-08 07:09:17 +00:00
Ben Bangert 18565ae005
chore: bump mapped-type dep and fix yarn warnings
Because:

* We want to keep with the latest versions of our dependencies.

This commit:

* Bumps mapped-type to the latest version, and consolidates several
  dependencies in the root package.json.
2023-09-06 18:25:45 -07:00
Dan Schomburg d29151935c
Merge pull request #15698 from mozilla/nx/ci-build-cache
task(CI): Improve nx caching for CI pipelines
2023-08-29 17:22:00 -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
Ben Bangert ae0230f7bb
refactor: use typed config for paypal client
Because:

* The paypal client config is a basic interface, and we'd like to be
  able to use Nest-Typed-Config with a structured config file.

This commit:

* Adds a typed config class for the paypal client.
2023-08-28 15:56:33 -07:00
Ben Bangert 54f0c2e7a2
chore: update to TS to 5.2.2 and Node to 18.17.1
Because:

* We want to use the latest typescript features.

This commit:

* Updates to TypeScript 5.2.2.
* Updates to Node 18.17.1 as OOM would occur frequently with 18.14.
* Updates CI to use a large instance with increased memory for Node.
2023-08-28 14:47:29 -07:00
Julian Poyourow 5b6060df51
chore(libs): add injectable to all library classes, centralize nest
Because:

* We want to easily be able to consume library classes within NestJS.
Adding the injectable decorator to all library classes means we can do
so with ease, but also doesn't prevent us from using the class outside
of the NestJS DI system.
* We want all dependencies (such as nest) centralized to the main
package.json

This commit:

* Adds the injectable decorator to every library class.
* Centralizes the NestJS dependency to the root package.json.

Closes: no relevant issue - polish PR.
2023-08-28 11:54:12 -07:00
Ben Bangert 0be6fd95c5
feat: add account manager class
Because:

* We want to have a single place to manage account related operations in
  the database layer.

This commit:

* Adds a new AccountManager class and account package.

Closes #FXA-6623
2023-08-18 09:06:28 -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 9c1afee646
feat(carts): refactor cart manager to match layers
Because:
- Refactor the Cart Manager to serve as higher level logic for the
  cart db model.

This commit:
- Removes service level logic.
- Adds common methods to be used by Cart Manager consumers.
- Adds checks for valid state by action and valid state transitions.
- Reverts playwright tests back to xlarge instance size

Closes FXA-8128
2023-08-15 18:03:36 -04:00
Lauren Zugai de637a5616
Merge pull request #15649 from mozilla/dependabot/npm_and_yarn/replace-in-file-7.0.1
chore(deps): bump replace-in-file from 6.3.5 to 7.0.1
2023-08-09 14:41:48 -05:00
Reino Muhl 1b9cbff619
feat(payments): cart manager cleanup
Because:

* Some items were identified not to meet code organization standards
  the team is implementing with Nx.
* Nx identified some circular dependencies that need resolving.

This commit:

* Resolves circular dependencies.
* More to do
2023-08-03 16:28:48 -04:00
dependabot[bot] 10c8df4271
chore(deps): bump replace-in-file from 6.3.5 to 7.0.1
Bumps [replace-in-file](https://github.com/adamreisnz/replace-in-file) from 6.3.5 to 7.0.1.
- [Release notes](https://github.com/adamreisnz/replace-in-file/releases)
- [Changelog](https://github.com/adamreisnz/replace-in-file/blob/main/CHANGELOG.md)
- [Commits](https://github.com/adamreisnz/replace-in-file/commits)

---
updated-dependencies:
- dependency-name: replace-in-file
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 06:57:45 +00:00
Reino Muhl 432e3b8d2b
feat(shared): hide fluent warning msgs in tests
Because:

* Fluent warning messages are slowing down tests.

This commit:

* Updates to the latest @fluent/react version
* Adds a non-console.warn reportError to testing ReactLocalization
  instantiations.

Closes #FXA-7958
2023-08-01 20:08:50 -04:00
Ben Bangert 32ab5581f0
chore: update and align nx deps
Because:

* We want to use the latest nx and align the version.

This commit:

* Updates nx and related packages to 16.0.0
2023-08-01 15:54:17 -07:00
Barry Chen 5b69b98377
Merge pull request #15632 from mozilla/dependabot/npm_and_yarn/eslint-plugin-import-2.28.0
chore(deps-dev): bump eslint-plugin-import from 2.25.3 to 2.28.0
2023-08-01 08:41:17 -05:00
dependabot[bot] 31a7f1ddc8
chore(deps-dev): bump eslint-plugin-import from 2.25.3 to 2.28.0
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.25.3 to 2.28.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.25.3...v2.28.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 06:41:02 +00:00
dependabot[bot] d2a719ede3
chore(deps-dev): bump @nx/js from 16.5.3 to 16.6.0
Bumps [@nx/js](https://github.com/nrwl/nx/tree/HEAD/packages/js) from 16.5.3 to 16.6.0.
- [Release notes](https://github.com/nrwl/nx/releases)
- [Commits](https://github.com/nrwl/nx/commits/16.6.0/packages/js)

---
updated-dependencies:
- dependency-name: "@nx/js"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 06:36:31 +00:00
Reino Muhl 2c2299f64f
Merge pull request #15536 from mozilla/FXA-6622-create-database-layer-object-for-account-in-fxa-ac
feat: add foundational db classes
2023-07-25 14:34:57 -04:00
dependabot[bot] da129df6a3
chore(deps-dev): bump @nx/jest from 16.3.1 to 16.5.5
Bumps [@nx/jest](https://github.com/nrwl/nx/tree/HEAD/packages/jest) from 16.3.1 to 16.5.5.
- [Release notes](https://github.com/nrwl/nx/releases)
- [Commits](https://github.com/nrwl/nx/commits/16.5.5/packages/jest)

---
updated-dependencies:
- dependency-name: "@nx/jest"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 06:09:31 +00:00
Ben Bangert 9e1670ab30
feat: add foundational db classes
Because:

 * We want to use clean and well tested code for our new integrated
   account database layer.
 * We don't want to use stored procedures for new code.

This commit:

 * Adds a new library that contains core mysql connection functionality.
 * Duplicates core objection classes and setup from fxa-shared without
   stored procedure functionality.

Closes FXA-6622
2023-07-24 14:44:12 -04:00
dependabot[bot] 0071903062
chore(deps-dev): bump nx from 16.3.1 to 16.5.5
Bumps [nx](https://github.com/nrwl/nx/tree/HEAD/packages/nx) from 16.3.1 to 16.5.5.
- [Release notes](https://github.com/nrwl/nx/releases)
- [Commits](https://github.com/nrwl/nx/commits/16.5.5/packages/nx)

---
updated-dependencies:
- dependency-name: nx
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 06:55:42 +00:00
Lisa Chan d4bf24117c
chore(next): Add Next.js to fxa and initial setup 2023-07-19 14:57:15 -04:00
Julian Poyourow 96882cea19
Merge pull request #15528 from mozilla/react-18
feat(all): react 18
2023-07-18 22:59:31 -07:00
Julian Poyourow 46654a60cb
feat(all): react 18
Because:

* We need to upgrade to react 18

This commit:

* Upgrades all frontend packages to react 18

Closes: FXA-7932
Closes: FXA-3587
Closes: FXA-4353
Closes: FXA-5081
Closes: FXA-5136
Closes: FXA-5140
Closes: FXA-5142
Closes: FXA-5143
2023-07-18 22:26:06 -07:00
Vijay Budhram dda5d295e8
Merge pull request #15540 from mozilla/dependabot/npm_and_yarn/nx/workspace-16.5.2
chore(deps-dev): bump @nx/workspace from 16.3.1 to 16.5.2
2023-07-18 13:47:33 -04:00
dschom df7897920d
task(gql-api): Allowlist graphql queries
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
2023-07-18 05:54:28 -07:00
dependabot[bot] 87f301b55c
chore(deps-dev): bump @nx/workspace from 16.3.1 to 16.5.2
Bumps [@nx/workspace](https://github.com/nrwl/nx/tree/HEAD/packages/workspace) from 16.3.1 to 16.5.2.
- [Release notes](https://github.com/nrwl/nx/releases)
- [Commits](https://github.com/nrwl/nx/commits/16.5.2/packages/workspace)

---
updated-dependencies:
- dependency-name: "@nx/workspace"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 06:27:49 +00:00
Ben Bangert 4f008b5163
chore: use nx-cloud
Because:

* We'd like faster builds to avoid repeat work.

This commit:

* Uses nx-cloud as a cache for build/test/lint operations.
2023-07-11 14:41:45 -07:00
Barry Chen a0b2cda909
chore(deps): upgrade react-scripts and webpack to v5
Because:
 - we want to upgrade our React/CRA packages to react-scripts and
   webpack v5

This commit:
 - upgrades react-scripts and webpack to v5 for Settings, Payments, and
   Admin Panel
   - upgrades other dependencies in order to make the react-scripts and
     webpack upgrades work
 - hybridizes fxa-auth-client and fxa-shared into dual module format
   packages
2023-07-11 13:32:40 -05:00
dependabot[bot] 6fc8eff086
chore(deps-dev): bump stylelint from 15.6.2 to 15.10.1
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.6.2 to 15.10.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.6.2...15.10.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-07 22:29:29 +00:00
Ben Bangert a9067bc74e
chore: update objection/knex dependencies
Because:

* Objection was outdated.

This commit:

* Updates the objection/knex dependencies and the root package.json in
  order to use the latest versions of objection and knex across the
  integrated configuration.
2023-07-07 09:46:25 -07:00
Reino Muhl fc6350f2e7
Merge pull request #15485 from mozilla/fxa-7670-ga-setup
feat(payments): Add GA to payments
2023-07-05 12:45:26 -04:00
Reino Muhl a8994e8094
feat(payments): Add GA to payments
Because:

* Need to add Google Analytics to payments server.

This commit:

* Performs the necessary setup to run GA events on payments for specific
  products.

Closes #FXA-7670
2023-07-05 12:08:33 -04:00
dependabot[bot] b46d5bd1f2
chore(deps): bump semver from 7.3.5 to 7.5.3
Bumps [semver](https://github.com/npm/node-semver) from 7.3.5 to 7.5.3.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.5...v7.5.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-28 07:26:33 +00:00
Julian Poyourow 1faa33a353
feat(payments/paypal): add subs/paypal library
Because:

* Nx gives us the ability to break things up into smaller libraries with
  individual responsibilities.
* Paypal logic can exist in a standalone library for reusability in SP3

This commit:

* Moves PayPalClient and associated utils/typings to a library named
  `subs/paypal`. It can be imported via `@fxa/payments/paypal` in any
  TypeScript code.

Closes FXA-7610
2023-06-07 11:40:10 -07:00
Julian Poyourow d07236bcd8
chore(build): upgrade nx to v16
Because:

* Nx released v16!

This commit:

* Upgrades Nx to v16 using `nx migrate`

Closes FXA-7622
2023-06-01 13:21:44 -07:00
dependabot[bot] f3a2814557
chore(deps-dev): bump stylelint-config-recommended-scss
Bumps [stylelint-config-recommended-scss](https://github.com/stylelint-scss/stylelint-config-recommended-scss) from 11.0.0 to 12.0.0.
- [Release notes](https://github.com/stylelint-scss/stylelint-config-recommended-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-recommended-scss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-recommended-scss/compare/v11.0.0...v12.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-recommended-scss
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-24 07:05:46 +00:00
Julian Poyourow 565ebb89c9
chore(build): initial nx implementation
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>
2023-05-23 08:37:47 -07:00
Barry Chen 2c0d552881
Merge pull request #15317 from mozilla/dependabot/npm_and_yarn/stylelint-15.6.2
chore(deps-dev): bump stylelint from 15.2.0 to 15.6.2
2023-05-17 07:56:38 -05:00
dependabot[bot] 68fd60d980
chore(deps-dev): bump stylelint-config-recommended-scss
Bumps [stylelint-config-recommended-scss](https://github.com/stylelint-scss/stylelint-config-recommended-scss) from 8.0.0 to 11.0.0.
- [Release notes](https://github.com/stylelint-scss/stylelint-config-recommended-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-recommended-scss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-recommended-scss/compare/v8.0.0...v11.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-recommended-scss
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-17 07:04:21 +00:00
dependabot[bot] 2038d18559
chore(deps-dev): bump stylelint from 15.2.0 to 15.6.2
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.2.0 to 15.6.2.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.2.0...15.6.2)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-17 07:02:56 +00:00
Barry Chen cc75ad3372
chore(deps): upgrade mocha in eslint-plugin-fxa
This commit also resolves `flat` in pm2's dependency graph to a newer
version.
2023-05-15 09:01:16 -05:00