Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.0.1
with:
version: 6.18.0
- name: Setup node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn format:check --base=remotes/origin/main
- name: Install dependencies
uses: pnpm/action-setup@v2.0.1
with:
version: 6.24.3
run_install: |
- args: [--frozen-lockfile, --strict-peer-dependencies]
- run: pnpm run build
- run: pnpm run format:check -- --base=remotes/origin/main
# - run: yarn affected:test --base=remotes/origin/main
- run: yarn affected:e2e --base=remotes/origin/main
- run: pnpm run affected:e2e -- --base=remotes/origin/main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
2 changes: 1 addition & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"*.{js,json,yaml,yml,css,scss,md,ts,html,graphql}": [
"yarn format"
"pnpm run format"
]
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ coverage
tmp
/libs/sdk/src/generated/g libs/themes/src/vendor
.github/*.md
.pnpm-store
2 changes: 1 addition & 1 deletion e2e/stack-e2e/lib/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function patchDistProjects(paths: ProjectDistPath[]): void {
for (const pkg of paths) {
const absDistPath = `file:/${getAbsPath(pkg.path)}`
if (packageDeps[pkg.package] && packageDeps[pkg.package] !== absDistPath) {
// console.log(` In ${path.package} => Update ${pkg.package} => ${absDistPath}`)
console.log(` In ${path.package} => Update ${pkg.package} => ${absDistPath}`)
packageDeps[pkg.package] = absDistPath
}
}
Expand Down
3 changes: 2 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
"accessToken": "MWYxY2VmZmUtMGQxOS00NGU3LWFhOTctMTE3ZWIxM2Y1MDExfHJlYWQtd3JpdGU="
"accessToken": "MWYxY2VmZmUtMGQxOS00NGU3LWFhOTctMTE3ZWIxM2Y1MDExfHJlYWQtd3JpdGU=",
"parallel": 3
}
}
},
Expand Down
45 changes: 26 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,43 +29,50 @@
},
"private": true,
"dependencies": {
"@schematics/angular": "^12.2.11",
"nxpm": "^1.18.0",
"@angular/core": "13.1.1",
"@schematics/angular": "^12.2.13",
"tslib": "^2.0.0"
},
"devDependencies": {
"@nrwl/angular": "13.0.1",
"@nrwl/cli": "13.0.1",
"@nrwl/devkit": "13.0.1",
"@nrwl/eslint-plugin-nx": "13.0.1",
"@nrwl/jest": "13.0.1",
"@nrwl/linter": "13.0.1",
"@nrwl/nest": "13.0.1",
"@nrwl/node": "13.0.1",
"@nrwl/nx-cloud": "12.5.0",
"@nrwl/nx-plugin": "13.0.1",
"@nrwl/tao": "13.0.1",
"@nrwl/workspace": "13.0.1",
"@angular/cli": "13.1.2",
"@babel/core": "^7.0.1",
"@babel/preset-env": "^7.0.0",
"@nrwl/angular": "13.4.6",
"@nrwl/cli": "13.4.6",
"@nrwl/devkit": "13.4.6",
"@nrwl/eslint-plugin-nx": "13.4.6",
"@nrwl/jest": "13.4.6",
"@nrwl/linter": "13.4.6",
"@nrwl/nest": "13.4.6",
"@nrwl/node": "13.4.6",
"@nrwl/nx-cloud": "13.0.3",
"@nrwl/nx-plugin": "13.4.6",
"@nrwl/tao": "13.4.6",
"@nrwl/workspace": "13.4.6",
"@nxtend/capacitor": "^12.0.0-beta.1",
"@nxtend/ionic-angular": "^12.0.0-beta.1",
"@types/jest": "27.0.2",
"@types/node": "14.14.33",
"@typescript-eslint/eslint-plugin": "4.31.2",
"@typescript-eslint/parser": "4.31.2",
"@typescript-eslint/eslint-plugin": "5.3.1",
"@typescript-eslint/parser": "5.3.1",
"babel-loader": "^8.0.2",
"chalk": "^4.1.2",
"dotenv": "10.0.0",
"eslint": "7.22.0",
"eslint": "8.2.0",
"eslint-config-prettier": "8.1.0",
"fs-extra": "^10.0.0",
"husky": "^7.0.1",
"jest": "27.2.3",
"lint-staged": "^11.0.1",
"prettier": "^2.3.1",
"rxjs": "^6.5.3",
"ts-jest": "27.0.5",
"ts-node": "~9.1.1",
"tslib": "^2.0.0",
"typescript": "4.3.5",
"typescript": "4.5.4",
"webpack": "^5.0.0",
"yaml": "^1.10.2",
"yargs": "^17.2.1"
"yargs": "^17.2.1",
"zone.js": "~0.11.4"
}
}
2 changes: 1 addition & 1 deletion packages/api/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"declaration": true,
"types": ["node"]
},
"exclude": ["**/*.spec.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"include": ["**/*.ts"]
}
12 changes: 11 additions & 1 deletion packages/api/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,15 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js", "**/*.spec.jsx", "**/*.d.ts"]
"include": [
"**/*.spec.ts",
"**/*.test.ts",
"**/*.spec.tsx",
"**/*.test.tsx",
"**/*.spec.js",
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx",
"**/*.d.ts"
]
}
2 changes: 1 addition & 1 deletion packages/cli/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"declaration": true,
"types": ["node"]
},
"exclude": ["**/*.spec.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"include": ["**/*.ts"]
}
12 changes: 11 additions & 1 deletion packages/cli/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,15 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js", "**/*.spec.jsx", "**/*.d.ts"]
"include": [
"**/*.spec.ts",
"**/*.test.ts",
"**/*.spec.tsx",
"**/*.test.tsx",
"**/*.spec.js",
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx",
"**/*.d.ts"
]
}
8 changes: 4 additions & 4 deletions packages/common/src/helpers/normalize-schema.helper.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ProjectType, readJson, Tree } from '@nrwl/devkit'
import { names, ProjectType, readJson, Tree } from '@nrwl/devkit'
import { AppTypeApi, AppTypeMobile, AppTypeWeb, BaseSchema, NormalizedSchema } from '../interfaces'
import { projectRootDir, toFileName } from '@nrwl/workspace'
import { projectRootDir } from '@nrwl/workspace'

export function normalizeOptions<T extends BaseSchema>(
host: Tree,
options: T,
projectType?: ProjectType,
): NormalizedSchema {
const name = toFileName(options?.name || '')
const name = names(options?.name || '').fileName
const nxJson = readJson(host, 'nx.json')

const appNameApi = options.apiName || 'api'
Expand Down Expand Up @@ -39,7 +39,7 @@ export function normalizeOptions<T extends BaseSchema>(
return baseResult
}

const projectDirectory = options.directory ? `${toFileName(options.directory)}/${name}` : name
const projectDirectory = options.directory ? `${names(options.directory).fileName}/${name}` : name
const projectName = projectDirectory?.replace(new RegExp('/', 'g'), '-')
const projectRoot = `${projectRootDir(projectType as any)}/${projectDirectory}`
const parsedTags: string[] = options.tags ? options.tags?.split(',').map((s) => s.trim()) : []
Expand Down
2 changes: 1 addition & 1 deletion packages/common/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"declaration": true,
"types": ["node"]
},
"exclude": ["**/*.spec.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"include": ["**/*.ts"]
}
12 changes: 11 additions & 1 deletion packages/common/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,15 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js", "**/*.spec.jsx", "**/*.d.ts"]
"include": [
"**/*.spec.ts",
"**/*.test.ts",
"**/*.spec.tsx",
"**/*.test.tsx",
"**/*.spec.js",
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx",
"**/*.d.ts"
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { formatFiles, Tree } from '@nrwl/devkit'
import { libraryGenerator } from '@nrwl/angular/generators'
import { Tree } from '@nrwl/devkit'
import { addFiles, normalizeOptions } from '@nxpm/common'
import { MobileLibGeneratorSchema } from './schema'

Expand All @@ -8,9 +8,9 @@ export async function generatorMobileLib(host: Tree, options: MobileLibGenerator
await libraryGenerator(host, {
...options,
name: options.name,
skipFormat: true,
})
if (files) {
addFiles(host, normalizedOptions, files)
}
await formatFiles(host)
}
2 changes: 1 addition & 1 deletion packages/mobile/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"declaration": true,
"types": ["node"]
},
"exclude": ["**/*.spec.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"include": ["**/*.ts"]
}
12 changes: 11 additions & 1 deletion packages/mobile/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,15 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js", "**/*.spec.jsx", "**/*.d.ts"]
"include": [
"**/*.spec.ts",
"**/*.test.ts",
"**/*.spec.tsx",
"**/*.test.tsx",
"**/*.spec.js",
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx",
"**/*.d.ts"
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { gql } from 'apollo-angular'
import { Injectable } from '@angular/core'
import * as Apollo from 'apollo-angular'
Expand Down
2 changes: 1 addition & 1 deletion packages/stack/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"declaration": true,
"types": ["node"]
},
"exclude": ["**/*.spec.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"include": ["**/*.ts"]
}
12 changes: 11 additions & 1 deletion packages/stack/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,15 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js", "**/*.spec.jsx", "**/*.d.ts"]
"include": [
"**/*.spec.ts",
"**/*.test.ts",
"**/*.spec.tsx",
"**/*.test.tsx",
"**/*.spec.js",
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx",
"**/*.d.ts"
]
}
3 changes: 2 additions & 1 deletion packages/web/src/generators/web-lib/generator-web-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ export async function generatorWebLib(
await libraryGenerator(host, {
...options,
name: options.name,
skipFormat: true,
})
if (files) {
addFiles(host, normalizedOptions, files, extraOptions)
}
await formatFiles(host)
// await formatFiles(host)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ import { FieldType } from '@ngx-formly/core'
type="checkbox"
class="focus:ring-pink-500 h-4 w-4 text-pink-600 border-gray-300 dark:bg-gray-800 dark:border-gray-600 rounded"
[class.is-invalid]="showError"
[class.static]="to.formCheck === 'nolabel'"
[indeterminate]="to.indeterminate && formControl.value == null"
[class.static]="to['formCheck'] === 'nolabel'"
[indeterminate]="to['indeterminate'] && formControl.value == null"
[formControl]="formControl"
[formlyAttributes]="field"
/>
</div>
<div class="ml-3 text-sm">
<label *ngIf="to.formCheck !== 'nolabel'" class="font-medium text-gray-700 dark:text-gray-300" [for]="id">
<label *ngIf="to['formCheck'] !== 'nolabel'" class="font-medium text-gray-700 dark:text-gray-300" [for]="id">
{{ to.label }}
<span *ngIf="to.required && to.hideRequiredMarker !== true">*</span>
<span *ngIf="to.required && to['hideRequiredMarker'] !== true">*</span>
</label>
</div>
</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UiFormCheckboxComponent extends FieldType {
formControl!: FormControl
defaultOptions = {
override formControl!: FormControl
override defaultOptions = {
templateOptions: {
indeterminate: true,
hideLabel: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { FieldType } from '@ngx-formly/core'
`,
})
export class UiFormInputComponent extends FieldType {
formControl!: FormControl
override formControl!: FormControl

get type(): string {
return this.to.type || 'text'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import { FieldType } from '@ngx-formly/core'
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UiFormMulticheckboxComponent extends FieldType {
formControl!: FormControl
defaultOptions = {
override formControl!: FormControl
override defaultOptions = {
templateOptions: {
options: [],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import { FieldType } from '@ngx-formly/core'
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UiFormRadioComponent extends FieldType {
formControl!: FormControl
defaultOptions = {
override formControl!: FormControl
override defaultOptions = {
templateOptions: {
options: [],
},
Expand Down
Loading