From 05961b68a4b060e6556ccfb50530460ab3072e22 Mon Sep 17 00:00:00 2001 From: John White <750350+johnhwhite@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:35:55 -0400 Subject: [PATCH 1/2] feat(components/ag-grid): add support for AG Grid 31.3.2 --- libs/components/ag-grid/package.json | 4 ++-- ...grid-data-manager-adapter.directive.spec.ts | 1 + .../ag-grid/ag-grid-wrapper.component.spec.ts | 4 ++++ libs/components/packages/package.json | 6 +++--- .../ag-grid-migrate.schematic.spec.ts | 2 +- .../ag-grid-migrate.schematic.ts | 6 ++++-- .../ag-grid/ag-grid.schematic.spec.ts | 2 +- .../update-10/ag-grid/ag-grid.schematic.ts | 2 +- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- 10 files changed, 28 insertions(+), 21 deletions(-) diff --git a/libs/components/ag-grid/package.json b/libs/components/ag-grid/package.json index 68dbc14d1d..11a44bd498 100644 --- a/libs/components/ag-grid/package.json +++ b/libs/components/ag-grid/package.json @@ -35,8 +35,8 @@ "@skyux/lookup": "0.0.0-PLACEHOLDER", "@skyux/popovers": "0.0.0-PLACEHOLDER", "@skyux/theme": "0.0.0-PLACEHOLDER", - "ag-grid-angular": "~31.2.0", - "ag-grid-community": "~31.2.0" + "ag-grid-angular": "~31.3.2", + "ag-grid-community": "~31.3.2" }, "dependencies": { "@skyux/icon": "0.0.0-PLACEHOLDER", diff --git a/libs/components/ag-grid/src/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.spec.ts b/libs/components/ag-grid/src/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.spec.ts index 3826846d95..db1331a8fa 100644 --- a/libs/components/ag-grid/src/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.spec.ts +++ b/libs/components/ag-grid/src/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.spec.ts @@ -532,6 +532,7 @@ it('should move the horizontal scroll based on enableTopScroll check', async () 'ag-floating-top', 'ag-body', 'ag-sticky-top', + 'ag-sticky-bottom', 'ag-floating-bottom', 'ag-overlay', ]); diff --git a/libs/components/ag-grid/src/lib/modules/ag-grid/ag-grid-wrapper.component.spec.ts b/libs/components/ag-grid/src/lib/modules/ag-grid/ag-grid-wrapper.component.spec.ts index 195809fdf0..db6962f4c6 100644 --- a/libs/components/ag-grid/src/lib/modules/ag-grid/ag-grid-wrapper.component.spec.ts +++ b/libs/components/ag-grid/src/lib/modules/ag-grid/ag-grid-wrapper.component.spec.ts @@ -509,6 +509,7 @@ describe('SkyAgGridWrapperComponent via fixture', () => { 'ag-floating-top', 'ag-body', 'ag-sticky-top', + 'ag-sticky-bottom', 'ag-floating-bottom', 'ag-overlay', ]); @@ -530,6 +531,7 @@ describe('SkyAgGridWrapperComponent via fixture', () => { 'ag-floating-top', 'ag-body', 'ag-sticky-top', + 'ag-sticky-bottom', 'ag-floating-bottom', 'ag-body-horizontal-scroll', 'ag-overlay', @@ -547,6 +549,7 @@ describe('SkyAgGridWrapperComponent via fixture', () => { 'ag-floating-top', 'ag-body', 'ag-sticky-top', + 'ag-sticky-bottom', 'ag-floating-bottom', 'ag-overlay', ]); @@ -562,6 +565,7 @@ describe('SkyAgGridWrapperComponent via fixture', () => { 'ag-floating-top', 'ag-body', 'ag-sticky-top', + 'ag-sticky-bottom', 'ag-floating-bottom', 'ag-body-horizontal-scroll', 'ag-overlay', diff --git a/libs/components/packages/package.json b/libs/components/packages/package.json index 71a2fef96b..107c276466 100644 --- a/libs/components/packages/package.json +++ b/libs/components/packages/package.json @@ -85,9 +85,9 @@ "@skyux/tiles": "0.0.0-PLACEHOLDER", "@skyux/toast": "0.0.0-PLACEHOLDER", "@skyux/validation": "0.0.0-PLACEHOLDER", - "ag-grid-angular": "~31.2.0", - "ag-grid-community": "~31.2.0", - "ag-grid-enterprise": "~31.2.0", + "ag-grid-angular": "~31.3.2", + "ag-grid-community": "~31.3.2", + "ag-grid-enterprise": "~31.3.2", "autonumeric": "^4.10.5" } }, diff --git a/libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.spec.ts b/libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.spec.ts index 4048064899..60c24c502d 100644 --- a/libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.spec.ts +++ b/libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.spec.ts @@ -19,7 +19,7 @@ interface TestSetup { schematic: (options: Schema) => Rule; } -const UPDATE_TO_VERSION = '31.2.0'; +const UPDATE_TO_VERSION = '31.3.2'; describe('ag-grid-migrate.schematic', () => { async function setupTest(): Promise { diff --git a/libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.ts b/libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.ts index 08cc962589..4b7a435091 100644 --- a/libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.ts +++ b/libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.ts @@ -5,7 +5,7 @@ import { platform } from 'os'; import { Schema } from './schema'; -const AG_GRID_MIGRATIONS = ['31.0.0', '31.1.0', '31.2.0']; +const AG_GRID_MIGRATIONS = ['31.0.0', '31.1.0', '31.2.1', '31.3.2']; const AG_GRID_VERSION = AG_GRID_MIGRATIONS.slice().pop(); export default function (options: Schema): Rule { @@ -42,10 +42,12 @@ export default function (options: Schema): Rule { }, ); for (const migration of AG_GRID_MIGRATIONS) { + const patchVersionZero = + migration.split('.').slice(0, 2).join('.') + '.0'; const cmdArgs = [ 'node_modules/@ag-grid-community/cli/index.cjs', 'migrate', - `--to=${migration}`, + `--to=${patchVersionZero}`, '--allow-dirty', ...agGridFiles, ]; diff --git a/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.spec.ts b/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.spec.ts index a9e0d2d3e8..2fc7a40e8e 100644 --- a/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.spec.ts +++ b/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.spec.ts @@ -5,7 +5,7 @@ import fs from 'fs-extra'; import { joinPathFragments } from 'nx/src/utils/path'; import { workspaceRoot } from 'nx/src/utils/workspace-root'; -const UPDATE_TO_VERSION = '31.2.0'; +const UPDATE_TO_VERSION = '31.3.2'; describe('ag-grid.schematic', () => { const runner = new SchematicTestRunner( diff --git a/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.ts b/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.ts index 94df8665f8..ce02120d34 100644 --- a/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.ts +++ b/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.ts @@ -19,7 +19,7 @@ const AG_GRID_ENT = 'ag-grid-enterprise'; const AG_GRID_NG = 'ag-grid-angular'; const AG_GRID_SKY = '@skyux/ag-grid'; -const AG_GRID_VERSION = '~31.2.0'; +const AG_GRID_VERSION = '~31.3.2'; /** * Check package.json for AG Grid dependencies. diff --git a/package-lock.json b/package-lock.json index 9817f6dc16..cfa89d54de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,8 +23,8 @@ "@blackbaud/skyux-design-tokens": "0.0.28", "@nx/angular": "19.3.1", "@skyux/icons": "7.3.0", - "ag-grid-angular": "31.2.0", - "ag-grid-community": "31.2.0", + "ag-grid-angular": "31.3.2", + "ag-grid-community": "31.3.2", "autonumeric": "4.10.5", "axe-core": "4.9.0", "comment-json": "4.2.3", @@ -12642,22 +12642,22 @@ } }, "node_modules/ag-grid-angular": { - "version": "31.2.0", - "resolved": "https://registry.npmjs.org/ag-grid-angular/-/ag-grid-angular-31.2.0.tgz", - "integrity": "sha512-dVRB9bQzbt3LBKQgHDjJ4NG9s8b1kXh/h0iS0jcrjgPzCLg4GTHomd5FLvbDWBiKOwCpurT4dy/O5+NKtGrGdg==", + "version": "31.3.2", + "resolved": "https://registry.npmjs.org/ag-grid-angular/-/ag-grid-angular-31.3.2.tgz", + "integrity": "sha512-k8nMrOGcoZeTNY7lXoPIWgn2ANE+v169v9X6XqddlJgYWoRrommG1Av2zSxPYUqayLzV0z/mKTHv7UjdLtnCGw==", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/common": ">= 14.0.0", "@angular/core": ">= 14.0.0", - "ag-grid-community": "31.2.0" + "ag-grid-community": "31.3.2" } }, "node_modules/ag-grid-community": { - "version": "31.2.0", - "resolved": "https://registry.npmjs.org/ag-grid-community/-/ag-grid-community-31.2.0.tgz", - "integrity": "sha512-Ija6X171Iq3mFZASZlriQIIdEFqA71rZIsjQD6KHy5lMmxnoseZTX2neThBav1gvr6SA6n5B2PD6eUHdZnrUfw==" + "version": "31.3.2", + "resolved": "https://registry.npmjs.org/ag-grid-community/-/ag-grid-community-31.3.2.tgz", + "integrity": "sha512-GxqFRD0OcjaVRE1gwLgoP0oERNPH8Lk8wKJ1txulsxysEQ5dZWHhiIoXXSiHjvOCVMkK/F5qzY6HNrn6VeDMTQ==" }, "node_modules/agent-base": { "version": "7.1.1", diff --git a/package.json b/package.json index 2a0833d69e..c54e8d7c6b 100644 --- a/package.json +++ b/package.json @@ -101,8 +101,8 @@ "@blackbaud/skyux-design-tokens": "0.0.28", "@nx/angular": "19.3.1", "@skyux/icons": "7.3.0", - "ag-grid-angular": "31.2.0", - "ag-grid-community": "31.2.0", + "ag-grid-angular": "31.3.2", + "ag-grid-community": "31.3.2", "autonumeric": "4.10.5", "axe-core": "4.9.0", "comment-json": "4.2.3", From 38da5eb36ee97dafec3b0fb21f796cd6e1729082 Mon Sep 17 00:00:00 2001 From: John White <750350+johnhwhite@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:56:26 -0400 Subject: [PATCH 2/2] Update peer range --- libs/components/ag-grid/package.json | 4 ++-- libs/components/packages/package.json | 6 +++--- .../migrations/update-10/ag-grid/ag-grid.schematic.spec.ts | 2 +- .../migrations/update-10/ag-grid/ag-grid.schematic.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/components/ag-grid/package.json b/libs/components/ag-grid/package.json index 11a44bd498..12ba59c127 100644 --- a/libs/components/ag-grid/package.json +++ b/libs/components/ag-grid/package.json @@ -35,8 +35,8 @@ "@skyux/lookup": "0.0.0-PLACEHOLDER", "@skyux/popovers": "0.0.0-PLACEHOLDER", "@skyux/theme": "0.0.0-PLACEHOLDER", - "ag-grid-angular": "~31.3.2", - "ag-grid-community": "~31.3.2" + "ag-grid-angular": "^31.3.2", + "ag-grid-community": "^31.3.2" }, "dependencies": { "@skyux/icon": "0.0.0-PLACEHOLDER", diff --git a/libs/components/packages/package.json b/libs/components/packages/package.json index 107c276466..674ffcb645 100644 --- a/libs/components/packages/package.json +++ b/libs/components/packages/package.json @@ -85,9 +85,9 @@ "@skyux/tiles": "0.0.0-PLACEHOLDER", "@skyux/toast": "0.0.0-PLACEHOLDER", "@skyux/validation": "0.0.0-PLACEHOLDER", - "ag-grid-angular": "~31.3.2", - "ag-grid-community": "~31.3.2", - "ag-grid-enterprise": "~31.3.2", + "ag-grid-angular": "^31.3.2", + "ag-grid-community": "^31.3.2", + "ag-grid-enterprise": "^31.3.2", "autonumeric": "^4.10.5" } }, diff --git a/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.spec.ts b/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.spec.ts index 2fc7a40e8e..19c5cf4a1c 100644 --- a/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.spec.ts +++ b/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.spec.ts @@ -70,7 +70,7 @@ describe('ag-grid.schematic', () => { await runner.runSchematic('ag-grid', {}, tree); expect(JSON.parse(tree.readText('/package.json'))).toEqual({ dependencies: { - 'ag-grid-community': `~${UPDATE_TO_VERSION}`, + 'ag-grid-community': `^${UPDATE_TO_VERSION}`, 'ag-grid-angular': UPDATE_TO_VERSION, }, }); diff --git a/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.ts b/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.ts index ce02120d34..42c11db28a 100644 --- a/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.ts +++ b/libs/components/packages/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.ts @@ -19,7 +19,7 @@ const AG_GRID_ENT = 'ag-grid-enterprise'; const AG_GRID_NG = 'ag-grid-angular'; const AG_GRID_SKY = '@skyux/ag-grid'; -const AG_GRID_VERSION = '~31.3.2'; +const AG_GRID_VERSION = '^31.3.2'; /** * Check package.json for AG Grid dependencies.