Skip to content

Commit 57bcbc4

Browse files
authored
fix(@cubejs-client/ngx): Update APF configuration and build settings for Angular 12+ compatibility (#9152) Thanks to @HaidarZ!
1 parent 9a73857 commit 57bcbc4

File tree

7 files changed

+39
-39
lines changed

7 files changed

+39
-39
lines changed

packages/cubejs-client-ngx/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# Cube.js Angular Client
99

10-
Cube.js Angular is an Angular Module for Angular 6+.
10+
Cube.js Angular is an Angular Module for Angular 12+.
1111

1212
[Learn more](https://github.com/cube-js/cube.js#getting-started)
1313

packages/cubejs-client-ngx/angular.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,22 @@
1212
"build": {
1313
"builder": "@angular-devkit/build-angular:ng-packagr",
1414
"options": {
15-
"tsConfig": "tsconfig.json",
16-
"project": "ng-package.json",
17-
"aot": true
18-
}
15+
"project": "ng-package.json"
16+
},
17+
"configurations": {
18+
"production": {
19+
"tsConfig": "tsconfig.prod.json"
20+
},
21+
"development": {
22+
"tsConfig": "tsconfig.json"
23+
}
24+
},
25+
"defaultConfiguration": "production"
1926
}
2027
}
2128
}
2229
},
23-
"defaultProject": "cubejs-client-ngx",
2430
"cli": {
2531
"analytics": "24ffae35-fafc-41e6-b395-db5f2f6f12d4"
2632
}
27-
}
33+
}

packages/cubejs-client-ngx/package.json

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,18 @@
99
"directory": "packages/cubejs-client-ngx"
1010
},
1111
"description": "Cube.js client for Angular",
12-
"main": "dist/bundles/cubejs-client-ngx.umd.js",
1312
"files": [
1413
"dist"
1514
],
1615
"license": "MIT",
17-
"watch": {
18-
"dev:publish": "dist/*"
19-
},
2016
"scripts": {
21-
"build": "./node_modules/ng-packagr/cli/main.js -c tsconfig.json -p ng-package.json && rm dist/package.json",
22-
"ng:watch": "./node_modules/ng-packagr/cli/main.js -c tsconfig.json -p ng-package.json --watch && rm dist/package.json",
17+
"build": "ng build",
18+
"ng:watch": "ng build --watch --configuration development",
2319
"dev": "yarn build && yalc publish --push"
2420
},
2521
"dependencies": {
2622
"fast-deep-equal": "^3.1.3",
27-
"tslib": "^2.0.0"
23+
"tslib": "^2.3.0"
2824
},
2925
"devDependencies": {
3026
"@angular-devkit/build-angular": "^13.3.11",
@@ -33,26 +29,11 @@
3329
"@angular/compiler-cli": "^13.3.11",
3430
"@angular/core": "^13.3.11",
3531
"ng-packagr": "^13.3.1",
36-
"npm-watch": "^0.7.0",
37-
"tsickle": "^0.39.1",
38-
"typescript": "~4.5.5"
32+
"rxjs": "~7.5.0",
33+
"typescript": "~4.6.2"
3934
},
4035
"peerDependencies": {
4136
"@cubejs-client/core": ">=0.28.1",
4237
"rxjs": ">=6.6.0"
43-
},
44-
"publishConfig": {
45-
"access": "public"
46-
},
47-
"module": "dist/fesm2015/cubejs-client-ngx.js",
48-
"es2015_ivy_ngcc": "__ivy_ngcc__/dist/fesm2015/cubejs-client-ngx.js",
49-
"es2015": "dist/fesm2015/cubejs-client-ngx.js",
50-
"esm5": "dist/esm5/cubejs-client-ngx.js",
51-
"esm2015": "dist/esm2015/cubejs-client-ngx.js",
52-
"fesm5": "dist/fesm5/cubejs-client-ngx.js",
53-
"fesm2015_ivy_ngcc": "__ivy_ngcc__/dist/fesm2015/cubejs-client-ngx.js",
54-
"fesm2015": "dist/fesm2015/cubejs-client-ngx.js",
55-
"typings": "dist/cubejs-client-ngx.d.ts",
56-
"metadata": "dist/cubejs-client-ngx.metadata.json",
57-
"sideEffects": false
38+
}
5839
}

packages/cubejs-client-ngx/src/query-builder/query-members.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
BinaryFilter,
99
} from '@cubejs-client/core';
1010
import { BehaviorSubject } from 'rxjs';
11-
import equal from 'fast-deep-equal';
11+
import equal from 'fast-deep-equal/es6';
1212

1313
import { Query } from './query';
1414

packages/cubejs-client-ngx/tsconfig.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@
22
"compilerOptions": {
33
"baseUrl": "./",
44
"outDir": "../../out-tsc/lib",
5-
"target": "es2015",
6-
"module": "es2015",
75
"moduleResolution": "node",
86
"declaration": true,
7+
"declarationMap": true,
98
"sourceMap": true,
109
"inlineSources": true,
1110
"experimentalDecorators": true,
1211
"importHelpers": true,
1312
"allowSyntheticDefaultImports": true,
13+
"strict": false,
1414
"types": [],
15-
"lib": ["dom", "es2018"],
15+
"target": "es2017",
16+
"module": "es2020",
17+
"lib": [
18+
"es2020",
19+
"dom"
20+
],
1621
"paths": {
1722
"@angular/*": ["./node_modules/@angular/*"],
1823
"@cubejs-client/core": ["../cubejs-client-core"]
@@ -25,8 +30,7 @@
2530
"fullTemplateTypeCheck": true,
2631
"strictInjectionParameters": true,
2732
"enableResourceInlining": true,
28-
"enableIvy": true,
29-
"preserveSymlinks": true
33+
"preserveSymlinks": true,
3034
},
3135
"exclude": ["src/test.ts", "**/*.spec.ts"],
3236
"include": ["index.ts", "src/*"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"declarationMap": false
5+
},
6+
"angularCompilerOptions": {
7+
"compilationMode": "partial"
8+
}
9+
}

packages/cubejs-playground/src/hooks/deep-compare-memoize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useRef } from 'react';
2-
import equals from 'fast-deep-equal';
2+
import equals from 'fast-deep-equal/es6';
33

44
export function useDeepCompareMemoize(value) {
55
const ref = useRef([]);

0 commit comments

Comments
 (0)