Skip to content

Commit 0e4668b

Browse files
authored
AG-16020 (#118)
* add v34.3 transform boilerplate * add codemod and simple test
1 parent 73d7b4c commit 0e4668b

File tree

23 files changed

+258
-0
lines changed

23 files changed

+258
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# `transform-grid-options-v34-3`
2+
3+
> _Transform deprecated Grid options_
4+
5+
See the [`transform-grid-options`](../../plugins/transform-grid-options/) plugin for usage instructions.
6+
7+
## Common tasks
8+
9+
### Add a test case
10+
11+
Create a new unit test scenario for this transform:
12+
13+
```
14+
pnpm run task:create-test --type transform --target transform-grid-options-v34-3
15+
```
16+
17+
### Add a new rule
18+
19+
Replacement rules are specified in [`replacements.ts`](./replacements.ts)
20+
21+
### Add to a codemod release
22+
23+
Add this source code transformation to a codemod release:
24+
25+
```
26+
pnpm run task:include-transform --transform transform-grid-options-v34-3
27+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { createGrid } from '@ag-grid-community/core';
2+
3+
const gridApi = createGrid(document.body, {
4+
columnDefs: [
5+
{ field: 'date' },
6+
{ field: 'country' },
7+
],
8+
rowData: [],
9+
hello: 'world',
10+
goodbye: 'world',
11+
friendly: true,
12+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = [];
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { createGrid } from '@ag-grid-community/core';
2+
3+
const gridApi = createGrid(document.body, {
4+
columnDefs: [
5+
{ field: 'date' },
6+
{ field: 'country' },
7+
],
8+
rowData: [],
9+
hello: 'world',
10+
goodbye: 'world',
11+
friendly: true,
12+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = [];
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"scenario": {
3+
"input": "input.js",
4+
"output": "output.js",
5+
"errors": "output.errors.cjs",
6+
"warnings": "output.warnings.cjs"
7+
}
8+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { createGrid } from '@ag-grid-community/core';
2+
3+
const gridApi = createGrid(document.body, {
4+
columnDefs: [
5+
{
6+
field: 'date',
7+
rowGroupingHierarchy: ['foo', 'bar'],
8+
},
9+
{ field: 'country' },
10+
],
11+
rowData: [],
12+
hello: 'world',
13+
goodbye: 'world',
14+
friendly: true,
15+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = [];
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { createGrid } from '@ag-grid-community/core';
2+
3+
const gridApi = createGrid(document.body, {
4+
columnDefs: [
5+
{
6+
field: 'date',
7+
groupHierarchy: ['foo', 'bar'],
8+
},
9+
{ field: 'country' },
10+
],
11+
rowData: [],
12+
hello: 'world',
13+
goodbye: 'world',
14+
friendly: true,
15+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = [];

0 commit comments

Comments
 (0)