WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 9544c2d

Browse files
committed
add version 34
1 parent 335ad9a commit 9544c2d

File tree

7 files changed

+94
-0
lines changed

7 files changed

+94
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# 34.0.0
2+
3+
Codemod for upgrading to [AG Grid v34.0.0](https://github.com/ag-grid/ag-grid/releases/tag/v34.0.0)
4+
5+
## Usage
6+
7+
```
8+
npx @ag-grid-devtools/cli migrate --to 34.0.0
9+
```
10+
11+
Source code transformations applied by this codemod are specified in [`transforms.ts`](./transforms.ts).
12+
13+
## Common tasks
14+
15+
### Add a transform
16+
17+
Option 1: Create a new source code transformation to add to this codemod release version:
18+
19+
```
20+
pnpm run task:create-transform --release 34.0.0
21+
```
22+
23+
Option 2: Add an existing source code transformation to this codemod release version:
24+
25+
```
26+
pnpm run task:include-transform --version 34.0.0
27+
```
28+
29+
### Add a test case
30+
31+
Create a new unit test scenario for this version:
32+
33+
```
34+
pnpm run task:create-test --type version --target 34.0.0
35+
```

packages/cli/src/codemods/versions/34.0.0/__fixtures__/scenarios/.gitignore

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { dirname, join } from 'node:path';
2+
import { fileURLToPath } from 'node:url';
3+
import { describe, expect, onTestFinished, test } from 'vitest';
4+
import { loadCodemodExampleScenarios } from '../../test/runners/codemod';
5+
6+
import codemod from './codemod';
7+
8+
const __dirname = dirname(fileURLToPath(import.meta.url));
9+
10+
describe(codemod, () => {
11+
const scenariosPath = join(__dirname, './__fixtures__/scenarios');
12+
loadCodemodExampleScenarios(scenariosPath, {
13+
codemod,
14+
vitest: { describe, expect, test, onTestFinished },
15+
});
16+
});
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { transformFileAst } from '@ag-grid-devtools/codemod-utils';
2+
import {
3+
type Codemod,
4+
type CodemodInput,
5+
type CodemodOptions,
6+
type CodemodResult,
7+
} from '@ag-grid-devtools/types';
8+
9+
import transforms from './transforms';
10+
11+
const codemod: Codemod = function codemodV34_0_0(
12+
file: CodemodInput,
13+
options: CodemodOptions,
14+
): CodemodResult {
15+
const { path, source } = file;
16+
const { fs, userConfig } = options;
17+
return transformFileAst(source, transforms, {
18+
filename: path,
19+
fs,
20+
userConfig,
21+
});
22+
};
23+
24+
export default codemod;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { type TransformManifest, type VersionManifest } from '@ag-grid-devtools/types';
2+
3+
const transforms: Array<TransformManifest> = [];
4+
5+
const manifest: VersionManifest = {
6+
version: '34.0.0',
7+
codemodPath: 'versions/34.0.0',
8+
transforms,
9+
};
10+
11+
export default manifest;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { type AstCliContext, type AstTransform } from '@ag-grid-devtools/ast';
2+
3+
const transforms: Array<AstTransform<AstCliContext>> = [];
4+
5+
export default transforms;

packages/cli/src/codemods/versions/manifest.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import v33_2_0 from './33.2.0/manifest';
2020

2121
import v33_3_0 from './33.3.0/manifest';
2222

23+
import v34_0_0 from './34.0.0/manifest';
24+
2325
const versions: Array<VersionManifest> = [
2426
v31_0_0,
2527
v31_1_0,
@@ -31,6 +33,7 @@ const versions: Array<VersionManifest> = [
3133
v33_1_0,
3234
v33_2_0,
3335
v33_3_0,
36+
v34_0_0,
3437
];
3538

3639
export default versions;

0 commit comments

Comments
 (0)