Skip to content

Commit

Permalink
Merge branch 'SQC-540/add-signin-multi' into SQC-540/add-signin-multi…
Browse files Browse the repository at this point in the history
…-breaking-change
  • Loading branch information
kujtimprenkuSQA committed Jul 24, 2023
2 parents 668d7a4 + 47bedc6 commit 970b9d1
Show file tree
Hide file tree
Showing 164 changed files with 6,112 additions and 4,494 deletions.
72 changes: 16 additions & 56 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,34 @@
"node": true,
"jest": true
},
"ignorePatterns": [
"**/*"
],
"plugins": [
"@nrwl/nx",
"@typescript-eslint",
"prettier",
"react-hooks"
],
"ignorePatterns": ["**/*"],
"plugins": ["@nx", "@typescript-eslint", "prettier", "react-hooks"],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": [
"*"
]
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": [
"*.ts",
"*.tsx"
],
"files": ["*.ts", "*.tsx"],
"parserOptions": {
"project": [
"tsconfig.*?.json"
]
"project": ["tsconfig.*?.json"]
},
"extends": [
"plugin:@nrwl/nx/typescript",
"plugin:@nx/typescript",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
Expand Down Expand Up @@ -88,11 +69,7 @@
"error",
{
"selector": "variableLike",
"format": [
"camelCase",
"PascalCase",
"UPPER_CASE"
],
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
"leadingUnderscore": "allow"
}
],
Expand All @@ -112,14 +89,8 @@
],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/consistent-type-exports": "error",
"curly": [
"error",
"all"
],
"eqeqeq": [
"error",
"smart"
],
"curly": ["error", "all"],
"eqeqeq": ["error", "smart"],
"default-case": "off",
"no-caller": "error",
"no-case-declarations": "off",
Expand All @@ -132,10 +103,7 @@
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"no-unused-expressions": "error",
"radix": [
"error",
"as-needed"
],
"radix": ["error", "as-needed"],
"no-restricted-syntax": [
"error",
{
Expand All @@ -148,22 +116,14 @@
"message": "Call parseFloat directly to guarantee radix param is not incorrectly provided"
}
],
"strict": [
"error",
"global"
],
"strict": ["error", "global"],
"valid-jsdoc": "error"
}
},
{
"files": [
"*.js",
"*.jsx"
],
"extends": [
"plugin:@nrwl/nx/javascript"
],
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
}
}
2 changes: 1 addition & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
node-version: "16.x"
cache: 'yarn'
- name: Check example apps
run: echo "EXAMPLE_APPS=$(ls ./examples | tr '\n' ',')" >> $GITHUB_ENV
run: echo "EXAMPLE_APPS=$(ls ./examples | tr '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV

- name: Install dependencies
run: yarn install --frozen-lockfile --prefer-offline
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ Thumbs.db

.angular
.npmrc

# Next.js
.next
108 changes: 54 additions & 54 deletions decorate-angular-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,59 +21,59 @@
* - Delete and reinstall your node_modules
*/

const fs = require("fs");
const os = require("os");
const cp = require("child_process");
const isWindows = os.platform() === "win32";
let output;
try {
output = require("@nrwl/workspace").output;
} catch (e) {
console.warn(
"Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed."
);
process.exit(0);
}
const fs = require("fs");
const os = require("os");
const cp = require("child_process");
const isWindows = os.platform() === "win32";
let output;
try {
output = require("@nx/workspace").output;
} catch (e) {
console.warn(
"Angular CLI could not be decorated to enable computation caching. Please ensure @nx/workspace is installed."
);
process.exit(0);
}

/**
* Symlink of ng to nx, so you can keep using `ng build/test/lint` and still
* invoke the Nx CLI and get the benefits of computation caching.
*/
function symlinkNgCLItoNxCLI() {
try {
const ngPath = "./node_modules/.bin/ng";
const nxPath = "./node_modules/.bin/nx";
if (isWindows) {
/**
* This is the most reliable way to create symlink-like behavior on Windows.
* Such that it works in all shells and works with npx.
*/
["", ".cmd", ".ps1"].forEach((ext) => {
if (fs.existsSync(nxPath + ext))
fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
});
} else {
// If unix-based, symlink
cp.execSync(`ln -sf ./nx ${ngPath}`);
}
} catch (e) {
output.error({
title:
"Unable to create a symlink from the Angular CLI to the Nx CLI:" +
e.message,
});
throw e;
}
}
/**
* Symlink of ng to nx, so you can keep using `ng build/test/lint` and still
* invoke the Nx CLI and get the benefits of computation caching.
*/
function symlinkNgCLItoNxCLI() {
try {
const ngPath = "./node_modules/.bin/ng";
const nxPath = "./node_modules/.bin/nx";
if (isWindows) {
/**
* This is the most reliable way to create symlink-like behavior on Windows.
* Such that it works in all shells and works with npx.
*/
["", ".cmd", ".ps1"].forEach((ext) => {
if (fs.existsSync(nxPath + ext))
fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
});
} else {
// If unix-based, symlink
cp.execSync(`ln -sf ./nx ${ngPath}`);
}
} catch (e) {
output.error({
title:
"Unable to create a symlink from the Angular CLI to the Nx CLI:" +
e.message,
});
throw e;
}
}

try {
symlinkNgCLItoNxCLI();
require("@nrwl/cli/lib/decorate-cli").decorateCli();
output.log({
title: "Angular CLI has been decorated to enable computation caching.",
});
} catch (e) {
output.error({
title: "Decoration of the Angular CLI did not complete successfully",
});
}
try {
symlinkNgCLItoNxCLI();
require("@nrwl/cli/lib/decorate-cli").decorateCli();
output.log({
title: "Angular CLI has been decorated to enable computation caching.",
});
} catch (e) {
output.error({
title: "Decoration of the Angular CLI did not complete successfully",
});
}
16 changes: 0 additions & 16 deletions examples/angular/.browserslistrc

This file was deleted.

4 changes: 2 additions & 2 deletions examples/angular/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"files": ["*.ts"],
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
Expand Down Expand Up @@ -34,7 +34,7 @@
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
/* eslint-disable */
module.exports = {
displayName: "angular",
preset: "../../jest.preset.js",
setupFilesAfterEnv: ["<rootDir>/src/test-setup.ts"],
globals: {
"ts-jest": {
tsconfig: "<rootDir>/tsconfig.spec.json",
stringifyContentPathRegex: "\\.(html|svg)$",
},
},
globals: {},
coverageDirectory: "../../coverage/examples/angular",
transform: {
"^.+\\.(ts|mjs|js|html)$": "jest-preset-angular",
"^.+\\.(ts|mjs|js|html)$": [
"jest-preset-angular",
{
tsconfig: "<rootDir>/tsconfig.spec.json",
stringifyContentPathRegex: "\\.(html|svg)$",
},
],
},
transformIgnorePatterns: ["node_modules/(?!.*\\.mjs$)"],
snapshotSerializers: [
Expand Down
25 changes: 10 additions & 15 deletions examples/angular/project.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"name": "angular",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"root": "examples/angular",
"sourceRoot": "examples/angular/src",
"prefix": "near-wallet-selector",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": [
"{options.outputPath}"
],
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/examples/angular",
"index": "examples/angular/src/index.html",
Expand Down Expand Up @@ -116,9 +115,7 @@
"output": "assets/"
}
],
"styles": [
"examples/angular/src/styles.scss"
],
"styles": ["examples/angular/src/styles.scss"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -173,7 +170,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": [
"examples/angular/src/**/*.ts",
Expand All @@ -182,21 +179,19 @@
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": [
"coverage/examples/angular"
],
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/examples/angular"],
"options": {
"jestConfig": "examples/angular/jest.config.js",
"jestConfig": "examples/angular/jest.config.ts",
"passWithNoTests": true
}
},
"deploy": {
"executor": "@nrwl/workspace:run-script",
"executor": "nx:run-script",
"options": {
"script": "gh-pages -d ./dist/examples/angular"
}
}
},
"tags": []
}
}
Loading

0 comments on commit 970b9d1

Please sign in to comment.