Skip to content
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

feat: updated to angular 14 #15

Merged
merged 13 commits into from
Aug 13, 2022
15 changes: 9 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defaults: &defaults
# https://circleci.com/blog/config-best-practices-dependency-caching/

orbs:
nx: nrwl/nx@1.1.3
nx: nrwl/nx@1.6.0
node: circleci/[email protected]
jobs:
build:
Expand All @@ -21,8 +21,10 @@ jobs:
- node/install-packages
# initialize nx
- nx/set-shas
# build content
- run: npx nx affected --base=$NX_BASE --target=build --parallel --max-parallel=2
# builds everything in the project in order
- run:
name: build
command: npx nx run workspace:build-all
# persist builds to workspace
- persist_to_workspace:
root: ~/code
Expand Down Expand Up @@ -116,8 +118,11 @@ jobs:
name: run setup-project.sh script
command: cd setup && ./setup-project.sh myprojectapp myproject myproject 9200 ~/setup-test
- run:
name: replace test project's @dereekb in node_modules with generated packages
name: replace test project's @dereekb in node_modules with generated packages (we don't want symlinks)
command: rm -r ~/setup-test/myproject/node_modules/@dereekb && cp -r dist/packages ~/setup-test/myproject/node_modules/@dereekb
- run:
name: Try build components
command: cd ~/setup-test/myproject && npx nx run-many --target=build-base --projects=myproject-firebase,myproject-components
- run:
name: Try build
command: cd ~/setup-test/myproject && npx -y nx build myproject && npx -y nx build myproject-api
Expand Down Expand Up @@ -203,8 +208,6 @@ workflows:
- test-setup-script:
requires:
- build
- test-with-node
- test-with-node-firebase
- run-release-and-push-to-main:
requires:
- build
Expand Down
14 changes: 2 additions & 12 deletions apps/demo-api/project.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/demo-api/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/workspace:run-commands",
"outputs": ["dist/apps/demo-api"],
"options": {
"command": "npx nx run demo-api:build-base",
"color": true
Expand All @@ -12,12 +14,6 @@
"build-base": {
"executor": "@nrwl/node:webpack",
"outputs": ["{options.outputPath}"],
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"outputPath": "dist/apps/demo-api",
"main": "apps/demo-api/src/main.ts",
Expand Down Expand Up @@ -101,12 +97,6 @@
},
"ci-deploy": {
"executor": "@nrwl/workspace:run-commands",
"dependsOn": [
{
"target": "build",
"projects": "self"
}
],
"options": {
"commands": [
{
Expand Down
1 change: 1 addition & 0 deletions apps/demo-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/demo-e2e/src",
"projectType": "application",
"targets": {
Expand Down
22 changes: 3 additions & 19 deletions apps/demo/project.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/demo/src",
"prefix": "app",
"targets": {
"build": {
"executor": "@nrwl/workspace:run-commands",
"outputs": ["dist/apps/demo"],
"options": {
"command": "npx nx run demo:build-base",
"color": true
Expand All @@ -13,12 +15,6 @@
"build-base": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"outputPath": "dist/apps/demo",
"index": "apps/demo/src/index.html",
Expand All @@ -36,7 +32,7 @@
"output": "assets/dbx-firebase"
}
],
"allowedCommonJsDependencies": ["validator", "date-fns-tz"],
"allowedCommonJsDependencies": ["lodash", "make-error", "validator", "date-fns-tz"],
"stylePreprocessorOptions": {
"includePaths": ["packages"]
},
Expand Down Expand Up @@ -114,24 +110,12 @@
},
"deploy": {
"executor": "@nrwl/workspace:run-commands",
"dependsOn": [
{
"target": "build",
"projects": "self"
}
],
"options": {
"command": "npx firebase --project=default deploy --only hosting"
}
},
"ci-deploy": {
"executor": "@nrwl/workspace:run-commands",
"dependsOn": [
{
"target": "build",
"projects": "self"
}
],
"options": {
"command": "npx firebase --project=default deploy --only hosting --token \"$FIREBASE_TOKEN\""
}
Expand Down
5 changes: 1 addition & 4 deletions apps/demo/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
/*
Add jest types to avoid angular compiler issues when importing from util.
*/
"types": ["segment-analytics", "jest"],
"target": "ES2017"
"target": "es2020"
},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"],
Expand Down
3 changes: 2 additions & 1 deletion apps/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
4 changes: 2 additions & 2 deletions components/demo-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@dereekb/demo-components",
"version": "8.15.2",
"peerDependencies": {
"@angular/common": "^13.3.0",
"@angular/core": "^13.3.0"
"@angular/common": "^14.0.0",
"@angular/core": "^14.0.0"
},
"dependencies": {
"tslib": "^2.3.0"
Expand Down
2 changes: 2 additions & 0 deletions components/demo-components/project.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "components/demo-components/src",
"prefix": "demo",
"targets": {
"build": {
"executor": "@nrwl/workspace:run-commands",
"outputs": ["dist/components/demo-components"],
"options": {
"command": "npx nx run demo-components:build-base",
"color": true
Expand Down
3 changes: 2 additions & 1 deletion components/demo-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
2 changes: 2 additions & 0 deletions components/demo-firebase/project.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "components/demo-firebase/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/workspace:run-commands",
"outputs": ["dist/components/demo-firebase"],
"options": {
"command": "npx nx run demo-firebase:build-base",
"color": true
Expand Down
7 changes: 7 additions & 0 deletions jest.resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ module.exports = (path, options) => {
// console.log('>>>', pkg.name)
delete pkg['exports'];
delete pkg['module'];
} else if (pkg.name === 'angular-calendar') {
// TEMPORARY: remove if/when https://github.com/mattlewis92/angular-calendar/pull/1599 is accepted
pkg['exports']['./date-adapters/date-fns'] = {
main: './date-adapters/date-fns/index.js',
types: './date-adapters/date-fns/index.d.ts',
default: './date-adapters/date-fns/index.js'
};
}

return pkg;
Expand Down
Loading