Skip to content

Commit

Permalink
chore: security updates (#120)
Browse files Browse the repository at this point in the history
* chore: ran ng update

* chore: more updates

* chore: more updates

* chore: remove semantic-release-cli

* chore: increase version number

BREAKING CHANGE: staying in sync with major Angular version
  • Loading branch information
bobbyg603 authored Jul 5, 2024
1 parent 8c18047 commit 1f552ad
Show file tree
Hide file tree
Showing 9 changed files with 15,096 additions and 50,015 deletions.
64,942 changes: 15,017 additions & 49,925 deletions package-lock.json

Large diffs are not rendered by default.

95 changes: 47 additions & 48 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,62 +28,61 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^17.0.2",
"@angular/common": "^17.0.2",
"@angular/compiler": "^17.0.2",
"@angular/core": "^17.0.2",
"@angular/forms": "^17.0.2",
"@angular/platform-browser": "^17.0.2",
"@angular/platform-browser-dynamic": "^17.0.2",
"@angular/router": "^17.0.2",
"bugsplat": "^8.0.0",
"core-js": "^2.6.3",
"rxjs": "^6.6.3",
"tslib": "^2.3.0",
"zone.js": "^0.14.2"
"@angular/animations": "^18.0.6",
"@angular/common": "^18.0.6",
"@angular/compiler": "^18.0.6",
"@angular/core": "^18.0.6",
"@angular/forms": "^18.0.6",
"@angular/platform-browser": "^18.0.6",
"@angular/platform-browser-dynamic": "^18.0.6",
"@angular/router": "^18.0.6",
"bugsplat": "^8.0.1",
"core-js": "^3.37.1",
"rxjs": "^7.8.1",
"tslib": "^2.6.3",
"zone.js": "^0.14.7"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.0.0",
"@angular-eslint/builder": "17.0.1",
"@angular-eslint/eslint-plugin": "17.0.1",
"@angular-eslint/eslint-plugin-template": "17.0.1",
"@angular-eslint/schematics": "17.0.1",
"@angular-eslint/template-parser": "17.0.1",
"@angular/cli": "^17.0.0",
"@angular/compiler-cli": "^17.0.2",
"@angular/language-service": "^17.0.2",
"@bugsplat/symbol-upload": "^8.0.6",
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@semantic-release/changelog": "^6.0.1",
"@angular-devkit/build-angular": "^18.0.7",
"@angular-eslint/builder": "18.1.0",
"@angular-eslint/eslint-plugin": "18.1.0",
"@angular-eslint/eslint-plugin-template": "18.1.0",
"@angular-eslint/schematics": "18.1.0",
"@angular-eslint/template-parser": "18.1.0",
"@angular/cli": "^18.0.7",
"@angular/compiler-cli": "^18.0.6",
"@angular/language-service": "^18.0.6",
"@bugsplat/symbol-upload": "^9.1.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.6",
"@types/node": "^12.20.55",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@types/jasmine": "^5.1.4",
"@types/jasminewd2": "^2.0.13",
"@types/node": "^20.14.9",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"copyfiles": "^2.4.1",
"dotenv": "^10.0.0",
"eslint": "^8.53.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.3.3",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.5.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"http-server": "^14.1.1",
"husky": "^8.0.1",
"husky": "^9.0.11",
"jasmine-auto-spies": "^8.0.1",
"jasmine-core": "^3.99.1",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.16",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"jasmine-core": "^5.1.2",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.3",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"karma-teamcity-reporter": "^1.1.0",
"ng-packagr": "^17.0.0",
"semantic-release": "^21.0.7",
"semantic-release-cli": "^5.2.1",
"ts-node": "^10.9.1",
"typescript": "~5.2.2"
"ng-packagr": "^18.0.0",
"semantic-release": "^24.0.0",
"ts-node": "^10.9.2",
"typescript": "^5.4.5"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions projects/bugsplat-ng/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bugsplat-ng",
"version": "16.0.0",
"version": "18.0.0",
"description": "BugSplat error reporting for Angular",
"license": "MIT",
"repository": {
Expand All @@ -9,7 +9,7 @@
},
"dependencies": {
"tslib": "^2.0.0",
"bugsplat": "^8.0.0"
"bugsplat": "^8.0.1"
},
"peerDependencies": {
"@angular/common": ">=15.0.0",
Expand Down
9 changes: 2 additions & 7 deletions projects/bugsplat-ng/src/lib/bugsplat.module.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import { HttpClientModule } from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BugSplat as BugSplatJs } from 'bugsplat';
import { BugSplat } from './bugsplat';
import { BugSplatErrorHandler } from './bugsplat-error-handler';
import { BugSplatSettings } from './bugsplat-settings';

@NgModule({
imports: [
BrowserModule,
HttpClientModule
]
})
@NgModule({ imports: [BrowserModule], providers: [provideHttpClient(withInterceptorsFromDi())] })
export class BugSplatModule {
static initializeApp(
settings: BugSplatSettings
Expand Down
2 changes: 1 addition & 1 deletion projects/bugsplat-ng/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'core-js/es7/reflect';
import 'core-js/proposals/reflect-metadata';
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
Expand Down
8 changes: 5 additions & 3 deletions projects/bugsplat-ng/src/test/bugsplat-error-handler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { BugSplatErrorHandler, } from '../lib/bugsplat-error-handler';
import { Spy, createSpyFromClass } from 'jasmine-auto-spies';
import { BugSplat } from '../lib/bugsplat';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';

describe('BugSplatErrorHandler', () => {
let bugsplat: Spy<BugSplat>;
Expand All @@ -11,8 +12,9 @@ describe('BugSplatErrorHandler', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
});
imports: [],
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
});
bugsplat = createSpyFromClass(BugSplat);
bugsplat.post.and.resolveWith();
expectedError = new Error('BugSplat rocks!');
Expand Down
8 changes: 5 additions & 3 deletions projects/bugsplat-ng/src/test/bugsplat-response-data.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { BugSplatResponseData, SuccessResponse } from '../lib/bugsplat-response-data';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';

describe('BugSplatResponseData', () => {

beforeEach(() => TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
}));
imports: [],
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
}));

it('should return BugSplatResponseData when createFromSuccessResponseObject is called with valid parameters', () => {
const response = {} as SuccessResponse;
Expand Down
41 changes: 16 additions & 25 deletions projects/my-angular-crasher/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpClientModule } from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { ErrorHandler, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BugSplatLogger, BugSplatLogLevel, BugSplatModule } from 'bugsplat-ng';
Expand All @@ -20,29 +20,20 @@ import { MyAngularErrorHandler } from './my-angular-error-handler';
// })
// Comment this to use the simple error handler

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
HttpClientModule,
BugSplatModule.initializeApp(environment.bugsplat)
],
providers: [
{
provide: ErrorHandler,
useClass: MyAngularErrorHandler
},
{
provide: BugSplatLogger,
useValue: new BugSplatLogger(
BugSplatLogLevel.info,
console
)
}
],
bootstrap: [AppComponent]
})
@NgModule({ declarations: [
AppComponent
],
bootstrap: [AppComponent], imports: [BrowserModule,
BugSplatModule.initializeApp(environment.bugsplat)], providers: [
{
provide: ErrorHandler,
useClass: MyAngularErrorHandler
},
{
provide: BugSplatLogger,
useValue: new BugSplatLogger(BugSplatLogLevel.info, console)
},
provideHttpClient(withInterceptorsFromDi())
] })

export class AppModule { }
2 changes: 1 addition & 1 deletion projects/my-angular-crasher/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

/** 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';
import 'core-js/proposals/reflect-metadata';

/**
* By default, zone.js will patch all possible macroTask and DomEvents
Expand Down

0 comments on commit 1f552ad

Please sign in to comment.