Skip to content

Commit

Permalink
fix: use angular 7, use correct versions in peerDependencies (#305)
Browse files Browse the repository at this point in the history
should still work with angular 6. the peerDependencies should have been updated in the last major version and were incorrect
  • Loading branch information
scttcper committed Oct 19, 2018
1 parent f4ac293 commit 0d3eba7
Show file tree
Hide file tree
Showing 13 changed files with 947 additions and 1,285 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cache:
script:
- yarn lint
- yarn test:ci
- yarn build
after_success:
- npm run travis-deploy-once "npm run semantic-release"
- yarn ghpages
Expand Down
2 changes: 2 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"typeCheck": true,
"format": "stylish",
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
Expand Down
1 change: 1 addition & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = function(config) {
},
reporters: ['mocha', 'kjhtml'],
port: 9876,
browserDisconnectTimeout: 10000,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
Expand Down
52 changes: 23 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,41 @@
"ng": "ng",
"start": "ng serve",
"prebuild": "rimraf dist",
"build": "ts-node build.ts",
"build": "ts-node -O '{\"module\": \"commonjs\"}' build.ts",
"test": "ng test --watch=false --browsers=ChromeCI",
"test:ci": "ng test --code-coverage --watch=false --no-progress --browsers=ChromeCI",
"test:watch": "ng test",
"lint": "ng lint angulartics2 --type-check --format stylish",
"lint:fix": "ng lint angulartics2 --type-check --fix --format stylish",
"commit": "git-cz",
"lint": "ng lint",
"lint:fix": "ng lint --fix",
"travis-deploy-once": "travis-deploy-once",
"semantic-release": "npm run build && cp -R .git dist/packages-dist && cd dist/packages-dist && semantic-release",
"presemantic-release": "cp -R .git dist/packages-dist",
"semantic-release": "cd dist/packages-dist && semantic-release",
"ghpages": "ng build --prod --no-progress --baseHref='/angulartics2/'"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.1.10",
"@angular/cdk": "^6.4.7",
"@angular/common": "^6.1.10",
"@angular/compiler": "^6.1.10",
"@angular/core": "^6.1.10",
"@angular/forms": "^6.1.10",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "^6.1.10",
"@angular/platform-browser-dynamic": "^6.1.10",
"@angular/router": "^6.1.10",
"@angular/animations": "^7.0.0",
"@angular/cdk": "^7.0.0",
"@angular/common": "^7.0.0",
"@angular/compiler": "^7.0.0",
"@angular/core": "^7.0.0",
"@angular/forms": "^7.0.0",
"@angular/material": "^7.0.0",
"@angular/platform-browser": "^7.0.0",
"@angular/platform-browser-dynamic": "^7.0.0",
"@angular/router": "^7.0.0",
"@ng-bootstrap/ng-bootstrap": "3.3.0",
"@uirouter/angular": "^2.0.2",
"bootstrap": "^4.1.3",
"core-js": "^2.5.7",
"rxjs": "6.3.3",
"rxjs": "^6.3.3",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.8.5",
"@angular/cli": "^6.2.5",
"@angular/compiler-cli": "^6.1.10",
"@angular/language-service": "^6.1.10",
"@angular-devkit/build-angular": "~0.10.1",
"@angular/cli": "^7.0.1",
"@angular/compiler-cli": "^7.0.0",
"@angular/language-service": "^7.0.0",
"@types/applicationinsights-js": "^1.0.7",
"@types/facebook-pixel": "^0.0.19",
"@types/fs-extra": "^5.0.4",
Expand All @@ -50,8 +50,6 @@
"@types/node": "~10.12.0",
"@types/segment-analytics": "^0.0.28",
"codelyzer": "^4.5.0",
"commitizen": "^3.0.2",
"cz-conventional-changelog": "^2.1.0",
"fs-extra": "^7.0.0",
"jasmine-core": "3.2.1",
"karma": "^3.0.0",
Expand All @@ -63,11 +61,12 @@
"karma-mocha-reporter": "^2.2.5",
"ng-packagr": "4.3.1",
"rimraf": "^2.6.2",
"semantic-release": "^15.9.17",
"semantic-release": "^15.10.3",
"travis-deploy-once": "^5.0.9",
"ts-node": "^7.0.1",
"tsickle": "^0.33.0",
"tslint": "^5.11.0",
"typescript": "2.9.2"
"typescript": "3.1.3"
},
"release": {
"branch": "master"
Expand All @@ -79,10 +78,5 @@
"repository": "angulartics/angulartics2",
"engines": {
"node": ">=8"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
}
}
51 changes: 34 additions & 17 deletions src/app/providers/providers.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,71 +13,88 @@ export class ProvidersComponent {
name: 'adobeanalytics',
display: 'Adobe Analytics',
type: 'Analytics',
}, {
},
{
name: 'amplitude',
display: 'Amplitude',
type: 'Analytics',
}, {
},
{
name: 'appinsights',
display: 'Azure Application Insights',
type: 'Analytics',
}, {
},
{
name: 'baidu',
display: 'Baidu',
type: 'Analytics',
}, {
},
{
name: 'clicky',
display: 'Clicky',
type: 'Analytics',
}, {
},
{
name: 'facebook',
display: 'Facebook Pixel',
type: 'Advertising',
}, {
},
{
name: 'ga',
display: 'Google Analytics',
type: 'Analytics',
}, {
},
{
name: 'ga-enhanced-ecom',
display: 'Google Analytics Enhanced Ecommerce',
type: 'Analytics',
}, {
},
{
name: 'gtm',
display: 'Google Tag Manager',
type: 'Analytics',
}, {
},
{
name: 'gst',
display: 'Google Global Site Tag',
type: 'Analytics',
}, {
},
{
name: 'hubspot',
display: 'HubSpot',
type: 'Analytics',
}, {
},
{
name: 'intercom',
display: 'Intercom',
type: 'Email',
}, {
},
{
name: 'kissmetrics',
display: 'Kissmetrics',
type: 'Analytics',
}, {
},
{
name: 'mixpanel',
display: 'Mixpanel',
type: 'Analytics',
}, {
},
{
name: 'piwik',
display: 'Piwik',
type: 'Analytics',
}, {
},
{
name: 'segment',
display: 'Segment',
type: 'Analytics',
}, {
},
{
name: 'splunk',
display: 'Splunk',
type: 'Analytics',
}, {
},
{
name: 'woopra',
display: 'Woopra',
type: 'Analytics',
Expand Down
22 changes: 22 additions & 0 deletions src/assets/svg/gst.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/browserslist
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
#
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed

> 0.5%
last 2 versions
Firefox ESR
not dead
# IE 9-11
not IE 9-11
6 changes: 3 additions & 3 deletions src/lib/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"dest": "../../../dist/core"
},
"peerDependencies": {
"@angular/common": ">= 5.0.0",
"@angular/core": ">= 5.0.0",
"rxjs": "^6.0.0"
"@angular/common": "^6.0.0 || ^7.0.0",
"@angular/core": "^6.0.0 || ^7.0.0",
"rxjs": "^6.1.0"
}
}
16 changes: 8 additions & 8 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
* Learn more in https://angular.io/guide/browser-support
*/

/***************************************************************************************************
Expand All @@ -34,18 +34,19 @@
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

/**
* If the application will be indexed by Google Search, the following is required.
* Googlebot uses a renderer based on Chrome 41.
* https://developers.google.com/search/docs/guides/rendering
**/
import 'core-js/es6/array';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';


/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';


/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
Expand Down Expand Up @@ -74,7 +75,6 @@ import 'core-js/es7/reflect';
import 'zone.js/dist/zone'; // Included with Angular CLI.



/***************************************************************************************************
* APPLICATION IMPORTS
*/
6 changes: 1 addition & 5 deletions src/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": [
"google.analytics",
"applicationinsights-js",
Expand All @@ -14,8 +13,5 @@
"angulartics2": ["./lib/core/public_api"]
}
},
"exclude": ["test.ts", "**/*.spec.ts", "lib/test.mocks.ts"],
"angularCompilerOptions": {
"preserveWhitespaces": false
}
"exclude": ["test.ts", "**/*.spec.ts", "lib/test.mocks.ts"]
}
8 changes: 2 additions & 6 deletions src/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../out-tsc/spec",
"baseUrl": "./",
"module": "commonjs",
"types": [
"jasmine",
"node",
Expand All @@ -16,9 +15,6 @@
"angulartics2": ["./lib/core/public_api"]
}
},
"files": ["test.ts", "polyfills.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"],
"angularCompilerOptions": {
"preserveWhitespaces": false
}
"files": ["test.ts", "polyfills.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
}
10 changes: 3 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
],
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"],
"paths": {
"angulartics2": ["./src/lib/core/public_api"]
}
Expand Down

0 comments on commit 0d3eba7

Please sign in to comment.