Skip to content

Commit

Permalink
chore: revert angular and bootstrap update (#1207)
Browse files Browse the repository at this point in the history
* Revert "feat: update to bootstrap 5.2.3 angular 15 and ng-bootstrap 14 (#1146)"

* Revert "fix(deps): update dependency typescript to v4.9.5 (#1179)"

* Revert "fix(deps): update dependency ngx-highlightjs to v8 (#1180)"

* Revert "fix(deps): update dependency @angular/cdk to v15 (#1182)"

* Revert "feat(demo): update angular version in migration guide (#1189)"
  • Loading branch information
gfellerph committed Mar 3, 2023
1 parent 699a7d8 commit cc3f6fd
Show file tree
Hide file tree
Showing 105 changed files with 3,266 additions and 2,566 deletions.
11 changes: 11 additions & 0 deletions .changeset/six-rules-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@swisspost/design-system-intranet-header': patch
'@swisspost/design-system-components-angular': patch
'@swisspost/internet-header': patch
'@swisspost/design-system-documentation': patch
'@swisspost/design-system-components': patch
'@swisspost/design-system-styles': patch
'@swisspost/design-system-demo': patch
---

Reverted the update to Bootstrap 5.2 and Angular 15. This update should have been a major release and will be re-released as such as soon as possible.
2 changes: 1 addition & 1 deletion packages/changelog-github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
},
"devDependencies": {
"@changesets/parse": "*",
"typescript": "4.9.5"
"typescript": "4.8.4"
}
}
8 changes: 0 additions & 8 deletions packages/components-angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,5 @@
}
}
}
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
40 changes: 20 additions & 20 deletions packages/components-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"lint": "ng lint"
},
"dependencies": {
"@angular/animations": "15.1.5",
"@angular/common": "15.1.5",
"@angular/compiler": "15.1.5",
"@angular/core": "15.1.5",
"@angular/forms": "15.1.5",
"@angular/localize": "15.1.5",
"@angular/platform-browser": "15.1.5",
"@angular/platform-browser-dynamic": "15.1.5",
"@angular/router": "15.1.5",
"@ng-bootstrap/ng-bootstrap": "14.0.1",
"@angular/animations": "14.2.12",
"@angular/common": "14.2.12",
"@angular/compiler": "14.2.12",
"@angular/core": "14.2.12",
"@angular/forms": "14.2.12",
"@angular/localize": "14.2.12",
"@angular/platform-browser": "14.2.12",
"@angular/platform-browser-dynamic": "14.2.12",
"@angular/router": "14.2.12",
"@ng-bootstrap/ng-bootstrap": "12.1.2",
"@popperjs/core": "2.11.6",
"@swisspost/design-system-styles": "workspace:5.4.0",
"rxjs": "7.8.0",
Expand All @@ -28,14 +28,14 @@
"zone.js": "0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "15.1.6",
"@angular-eslint/builder": "15.2.1",
"@angular-eslint/eslint-plugin": "15.2.1",
"@angular-eslint/eslint-plugin-template": "15.2.1",
"@angular-eslint/schematics": "15.2.1",
"@angular-eslint/template-parser": "15.2.1",
"@angular/cli": "15.1.6",
"@angular/compiler-cli": "15.1.5",
"@angular-devkit/build-angular": "14.2.10",
"@angular-eslint/builder": "14.4.0",
"@angular-eslint/eslint-plugin": "14.4.0",
"@angular-eslint/eslint-plugin-template": "14.4.0",
"@angular-eslint/schematics": "14.4.0",
"@angular-eslint/template-parser": "14.4.0",
"@angular/cli": "14.2.10",
"@angular/compiler-cli": "14.2.12",
"@types/jasmine": "4.3.1",
"@types/node": "18.14.0",
"@typescript-eslint/eslint-plugin": "5.53.0",
Expand All @@ -47,8 +47,8 @@
"karma-coverage": "2.2.0",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.0.0",
"ng-packagr": "15.1.2",
"ng-packagr": "14.2.2",
"rimraf": "4.1.2",
"typescript": "4.9.5"
"typescript": "4.8.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
<T>(id: string): T;
keys(): string[];
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
);

// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().forEach(context);
12 changes: 12 additions & 0 deletions packages/components-angular/projects/intranet-header/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
<T>(id: string): T;
keys(): string[];
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
);

// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().forEach(context);
5 changes: 2 additions & 3 deletions packages/components-angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
"target": "es2020",
"module": "es2020",
"paths": {
"intranet-header": [
Expand All @@ -27,8 +27,7 @@
"lib": [
"es2020",
"dom"
],
"useDefineForClassFields": false
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
4 changes: 2 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@stencil/react-output-target": "0.4.0",
"@stencil/sass": "2.0.3",
"@swisspost/design-system-styles": "workspace:5.4.0",
"bootstrap": "5.2.3",
"bootstrap": "5.1.3",
"puppeteer": "19.7.2",
"sass": "1.58.3"
},
Expand All @@ -54,6 +54,6 @@
"jest": "27.5.1",
"jest-cli": "27.5.1",
"npm-run-all": "4.1.5",
"typescript": "4.9.5"
"typescript": "4.8.4"
}
}
37 changes: 22 additions & 15 deletions packages/demo/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,23 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": ["bootstrap/js/dist/collapse", "prettier"],
"outputPath": "dist/demo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss", "./node_modules/highlight.js/styles/vs2015.css"],
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss",
"./node_modules/highlight.js/styles/vs2015.css"
],
"stylePreprocessorOptions": {
"includePaths": ["node_modules"]
"includePaths": [
"node_modules"
]
},
"vendorChunk": true,
"extractLicenses": false,
Expand Down Expand Up @@ -80,15 +87,23 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": ["src/styles.scss"],
"styles": [
"src/styles.scss"
],
"scripts": [],
"assets": ["src/favicon.ico", "src/assets"]
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
Expand All @@ -106,13 +121,5 @@
}
}
}
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
50 changes: 25 additions & 25 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,42 @@
"lint": "ng lint"
},
"dependencies": {
"@angular/animations": "15.1.5",
"@angular/cdk": "15.2.0",
"@angular/common": "15.1.5",
"@angular/compiler": "15.1.5",
"@angular/core": "15.1.5",
"@angular/forms": "15.1.5",
"@angular/localize": "15.1.5",
"@angular/platform-browser": "15.1.5",
"@angular/platform-browser-dynamic": "15.1.5",
"@angular/router": "15.1.5",
"@ng-bootstrap/ng-bootstrap": "14.0.1",
"@angular/animations": "14.2.12",
"@angular/cdk": "14.2.7",
"@angular/common": "14.2.12",
"@angular/compiler": "14.2.12",
"@angular/core": "14.2.12",
"@angular/forms": "14.2.12",
"@angular/localize": "14.2.12",
"@angular/platform-browser": "14.2.12",
"@angular/platform-browser-dynamic": "14.2.12",
"@angular/router": "14.2.12",
"@ng-bootstrap/ng-bootstrap": "12.1.2",
"@popperjs/core": "2.11.6",
"@swimlane/ngx-datatable": "20.1.0",
"@swisspost/design-system-intranet-header": "workspace:3.1.0",
"@swisspost/design-system-styles": "workspace:5.4.0",
"bootstrap": "5.2.3",
"bootstrap": "5.1.3",
"core-js": "3.28.0",
"highlight.js": "11.7.0",
"ngx-highlightjs": "8.0.0",
"ngx-toastr": "16.0.2",
"ngx-highlightjs": "7.0.1",
"ngx-toastr": "15.2.2",
"rxjs": "7.8.0",
"tslib": "2.5.0",
"zone.js": "0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "15.1.6",
"@angular-devkit/build-angular": "14.2.10",
"@angular-devkit/build-optimizer": "0.1202.18",
"@angular-eslint/builder": "15.2.1",
"@angular-eslint/eslint-plugin": "15.2.1",
"@angular-eslint/eslint-plugin-template": "15.2.1",
"@angular-eslint/schematics": "15.2.1",
"@angular-eslint/template-parser": "15.2.1",
"@angular/cli": "15.1.6",
"@angular/compiler-cli": "15.1.5",
"@angular/elements": "15.1.5",
"@angular/language-service": "15.1.5",
"@angular-eslint/builder": "14.4.0",
"@angular-eslint/eslint-plugin": "14.4.0",
"@angular-eslint/eslint-plugin-template": "14.4.0",
"@angular-eslint/schematics": "14.4.0",
"@angular-eslint/template-parser": "14.4.0",
"@angular/cli": "14.2.10",
"@angular/compiler-cli": "14.2.12",
"@angular/elements": "14.2.12",
"@angular/language-service": "14.2.12",
"@types/highlight.js": "9.12.4",
"@types/jasmine": "4.3.1",
"@types/jasminewd2": "2.0.10",
Expand All @@ -71,7 +71,7 @@
"sass": "1.58.3",
"sockjs": "0.3.24",
"ts-node": "10.9.1",
"typescript": "4.9.5",
"typescript": "4.8.4",
"webpack": "5.75.0"
}
}
1 change: 1 addition & 0 deletions packages/demo/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const routes: Routes = [
imports: [
RouterModule.forRoot(routes, {
useHash: true,
relativeLinkResolution: "legacy",
}),
],
exports: [RouterModule],
Expand Down
30 changes: 10 additions & 20 deletions packages/demo/src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,22 +164,17 @@ <h4 class="h5 bold">
<li>
<h4 class="h5 bold">Update your packages 🩺</h4>
<p>
If your Angular version is lower than 15, use
<a href="https://update.angular.io/" target="_blank" rel="noopener">
https://update.angular.io/
</a>
to update Angular step by step to version 15.
If your Angular version is lower than 14, use
<a href="https://update.angular.io/" target="_blank" rel="noopener">https://update.angular.io/</a>
to update Angular step by step to version 14.
</p>
<p>Make sure, you have updated all your packages as far as possible.</p>
</li>
<li>
<h4 class="h5 bold">Bootstrap migration 🥾</h4>
<p>
Check the
<a href="https://getbootstrap.com/docs/5.0/migration/" target="_blank" rel="noopener">
Bootstrap migration guide
</a>
to see if you need to update any Bootstrap-related code.
Check the <a href="https://getbootstrap.com/docs/5.0/migration/" target="_blank" rel="noopener">Bootstrap
migration guide</a> to see if you need to update any Bootstrap-related code.
</p>
</li>
<li *ngIf="isMigratingAngular">
Expand All @@ -191,8 +186,8 @@ <h4 class="h5 bold">Automatic migration tool ⚙️</h4>
<li>Commit all the changes you made until now</li>
<li>Make sure you are running on a node version >= 16</li>
<li>
You should now be able to run the following command to have automatic migrations applied
to your application:
You should now be able to run the following command to have automatic migrations
applied to your application:
<code
appCopyToClipboard
class="d-block mt-1 p-3"
Expand Down Expand Up @@ -235,12 +230,10 @@ <h5 class="h6 bold">Migrations list</h5>
<p>
Some changes cannot be migrated automatically.
<br />
Check the list of changes below and apply the transformations manually if your application
is affected.
Check the list of changes below and apply the transformations manually if your application is affected.
</p>
<p class="info" *ngIf="isMigratingAngular">
Changes flagged with the ⚙️ symbol should be automatically migrated with our migration
tool.
Changes flagged with the ⚙️ symbol should be automatically migrated with our migration tool.
</p>

<!-- Post migration table -->
Expand Down Expand Up @@ -353,10 +346,7 @@ <h5 class="mt-4 h6 bold">Paths &amp; Files</h5>

<span class="info">
Read more about Sass modules and the @use rule in the Sass
<a href="https://sass-lang.com/documentation/at-rules/use">
@use documentation
</a>
.
<a href="https://sass-lang.com/documentation/at-rules/use">@use documentation</a>.
</span>
</label>
</div>
Expand Down
Loading

0 comments on commit cc3f6fd

Please sign in to comment.