-
Couldn't load subscription status.
- Fork 218
chore(payments-next): Add payments-email nx library #19560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
david1alvarez
wants to merge
1
commit into
main
Choose a base branch
from
payments-email-lib
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+425
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "extends": ["../../../.eslintrc.json"], | ||
| "ignorePatterns": ["!**/*"], | ||
| "overrides": [ | ||
| { | ||
| "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
| "rules": {} | ||
| }, | ||
| { | ||
| "files": ["*.ts", "*.tsx"], | ||
| "rules": {} | ||
| }, | ||
| { | ||
| "files": ["*.js", "*.jsx"], | ||
| "rules": {} | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "jsc": { | ||
| "target": "es2017", | ||
| "parser": { | ||
| "syntax": "typescript", | ||
| "decorators": true, | ||
| "dynamicImport": true | ||
| }, | ||
| "transform": { | ||
| "decoratorMetadata": true, | ||
| "legacyDecorator": true | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
|
|
||
| This library was generated with [Nx](https://nx.dev). | ||
|
|
||
| ## Building | ||
|
|
||
| Run `nx build payments-email` to build the library. | ||
|
|
||
| ## Running unit tests | ||
|
|
||
| Run `nx test payments-email` to execute the unit tests via [Jest](https://jestjs.io). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* eslint-disable */ | ||
| import { readFileSync } from 'fs'; | ||
| import { Config } from 'jest'; | ||
|
|
||
| // Reading the SWC compilation config and remove the "exclude" | ||
| // for the test files to be compiled by SWC | ||
| const { exclude: _, ...swcJestConfig } = JSON.parse( | ||
| readFileSync(`${__dirname}/.swcrc`, 'utf-8') | ||
| ); | ||
|
|
||
| // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. | ||
| // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" | ||
| if (swcJestConfig.swcrc === undefined) { | ||
| swcJestConfig.swcrc = false; | ||
| } | ||
|
|
||
| // Uncomment if using global setup/teardown files being transformed via swc | ||
| // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries | ||
| // jest needs EsModule Interop to find the default exported setup/teardown functions | ||
| // swcJestConfig.module.noInterop = false; | ||
|
|
||
| const config: Config = { | ||
| displayName: 'payments-email', | ||
| preset: '../../../jest.preset.js', | ||
| transform: { | ||
| '^.+\\.[tj]s$': ['@swc/jest', swcJestConfig], | ||
| }, | ||
| moduleFileExtensions: ['ts', 'js', 'html'], | ||
| testEnvironment: 'node', | ||
| coverageDirectory: '../../../coverage/libs/payments/email', | ||
| reporters: [ | ||
| 'default', | ||
| [ | ||
| 'jest-junit', | ||
| { | ||
| outputDirectory: 'artifacts/tests/payments-email', | ||
| outputName: 'payments-email-jest-unit-results.xml', | ||
| }, | ||
| ], | ||
| ], | ||
| }; | ||
|
|
||
| export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "name": "@fxa/payments/email", | ||
| "version": "0.0.1" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| { | ||
| "name": "payments-email", | ||
| "$schema": "../../../node_modules/nx/schemas/project-schema.json", | ||
| "sourceRoot": "libs/payments/email/src", | ||
| "projectType": "library", | ||
| "tags": ["scope:shared:lib:payments"], | ||
| "targets": { | ||
| "build": { | ||
| "executor": "@nx/esbuild:esbuild", | ||
| "outputs": ["{options.outputPath}"], | ||
| "defaultConfiguration": "production", | ||
| "options": { | ||
| "main": "libs/payments/email/src/index.ts", | ||
| "outputPath": "dist/libs/payments/email", | ||
| "outputFileName": "main.js", | ||
| "tsConfig": "libs/payments/email/tsconfig.lib.json", | ||
| "declaration": true, | ||
| "assets": [ | ||
| { | ||
| "glob": "libs/payments/email/README.md", | ||
| "input": ".", | ||
| "output": "." | ||
| } | ||
| ], | ||
| "platform": "node" | ||
| }, | ||
| "configurations": { | ||
| "development": { | ||
| "minify": false | ||
| }, | ||
| "production": { | ||
| "minify": true | ||
| } | ||
| } | ||
| }, | ||
| "lint": { | ||
| "executor": "@nx/eslint:lint", | ||
| "outputs": ["{options.outputFile}"], | ||
| "options": { | ||
| "lintFilePatterns": ["libs/payments/email/**/*.ts"] | ||
| } | ||
| }, | ||
| "test-unit": { | ||
| "executor": "@nx/jest:jest", | ||
| "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
| "options": { | ||
| "jestConfig": "libs/payments/email/jest.config.ts" | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "extends": "../../../tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "module": "commonjs" | ||
| }, | ||
| "files": [], | ||
| "include": [], | ||
| "references": [ | ||
| { | ||
| "path": "./tsconfig.lib.json" | ||
| }, | ||
| { | ||
| "path": "./tsconfig.spec.json" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "outDir": "../../../dist/out-tsc", | ||
| "declaration": true, | ||
| "types": ["node"] | ||
| }, | ||
| "include": ["src/**/*.ts"], | ||
| "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "outDir": "../../../dist/out-tsc", | ||
| "module": "commonjs", | ||
| "types": ["jest", "node"] | ||
| }, | ||
| "include": [ | ||
| "jest.config.ts", | ||
| "src/**/*.test.ts", | ||
| "src/**/*.spec.ts", | ||
| "src/**/*.d.ts" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nx test-unit payments-email