Skip to content

Commit

Permalink
Release v32.0.0 (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCooper authored Jul 2, 2024
2 parents d3d5bac + 15156f4 commit a475d4a
Show file tree
Hide file tree
Showing 71 changed files with 4,508 additions and 3,119 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
version: 9
- name: Install Node.js
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
version: 9
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
10 changes: 4 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"cSpell.words": [
"Codemod",
"codemods",
"organised"
]
}
"cSpell.words": ["Codemod", "codemods", "organised"],
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
28 changes: 19 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@
"type": "git",
"url": "https://github.com/ag-grid/devtools.git"
},
"engines": {
"node": ">=18",
"pnpm": ">=9.4.0"
},
"scripts": {
"ci": "pnpm run verify && pnpm run build",
"build": "pnpm run --filter @ag-grid-devtools/cli build",
"build:lib": "pnpm run --recursive --parallel build:lib && pnpm run build:docs && pnpm run coverage",
"build:docs": "typedoc",
"verify": "pnpm run /^\\(lint\\|test\\)$/",
"eslint:fix": " pnpm run --recursive --parallel lint:eslint --fix",
"lint": "pnpm run /^lint:.*/ && pnpm run --recursive --parallel lint",
"lint:eslint": "eslint --ext js,cjs,mjs,ts .",
"lint:typescript": "tsc --noEmit",
"lint:typescript": "tsc --noEmit && pnpm run --recursive --parallel lint:typescript",
"test": "vitest run",
"test:watch": "vitest watch",
"coverage": "vitest run --coverage",
Expand All @@ -22,15 +27,20 @@
"version": "pnpm --filter @ag-grid-devtools/cli exec -- pnpm run --silent version",
"publish": "pnpm run --filter @ag-grid-devtools/cli publish"
},
"peerDependencies": {
"@vitest/coverage-v8": "^1",
"typedoc": "^0.25",
"typescript": "^5",
"vite": "^5",
"vitest": "^1"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/generator": "7.23.0",
"@babel/parser": "7.23.0",
"@babel/template": "7.22.15",
"@babel/traverse": "7.23.2",
"@babel/types": "7.23.0",
"@types/glob": "8.1.0",
"glob": "10.3.10"
"glob": "10.4.2",
"prettier": "3.3.2",
"typedoc": "^0.26.3",
"typescript": "5.5.2",
"vite": "5.3.2",
"vitest": "1.6.0",
"@vitest/coverage-v8": "1.6.0"
}
}
2 changes: 1 addition & 1 deletion packages/ast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},
"peerDependencies": {
"eslint": "^8",
"typedoc": "^0.25",
"typedoc": "^0.26",
"typescript": "^5",
"vite": "^5",
"vitest": "^1"
Expand Down
8 changes: 4 additions & 4 deletions packages/ast/src/scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ function getDestructuredRestPatternPropertyPath(
const key: AccessorKey | null = !precedingSiblings
? null
: precedingSiblings.type === PrecedingFieldsType.Array
? AccessorKey.ArrayRest({ startIndex: precedingSiblings.count })
: precedingSiblings.type === PrecedingFieldsType.Object
? AccessorKey.ObjectRest({ excluded: precedingSiblings.fields })
: null;
? AccessorKey.ArrayRest({ startIndex: precedingSiblings.count })
: precedingSiblings.type === PrecedingFieldsType.Object
? AccessorKey.ObjectRest({ excluded: precedingSiblings.fields })
: null;
if (!key) return null;
return getDestructuredPropertyPath(identifier, id, {
path: [...parentPattern.path, key],
Expand Down
3 changes: 1 addition & 2 deletions packages/ast/vitest.config.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="vitest" />
import { join, resolve } from 'path';
import { defineConfig, mergeConfig } from 'vite';
import { defineConfig, mergeConfig } from 'vitest/config';

import base from './vite.config.mts';

Expand Down
30 changes: 15 additions & 15 deletions packages/build-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@
"lint": "eslint --ext js,cjs,mjs,ts ."
},
"dependencies": {
"@types/node": "20.11.29",
"@types/react": "18.2.21",
"@typescript-eslint/eslint-plugin": "6.6.0",
"@typescript-eslint/parser": "6.6.0",
"@vitejs/plugin-react-swc": "3.5.0",
"@vitest/coverage-v8": "1.3.1",
"eslint": "8.48.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-vitest": "0.3.1",
"prettier": "3.0.3",
"@types/node": "20.14.9",
"@types/react": "18.3.3",
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"@vitejs/plugin-react-swc": "3.7.0",
"@vitest/coverage-v8": "1.6.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-vitest": "0.4.1",
"prettier": "3.3.2",
"rollup-plugin-preserve-shebang": "1.0.1",
"typescript": "5.2.2",
"vite": "5.0.11",
"typescript": "5.5.2",
"vite": "^5.3.2",
"vite-plugin-dts": "3.7.0",
"vite-plugin-node-polyfills": "0.19.0",
"vite-plugin-static-copy": "1.0.0",
"vitest": "1.3.1"
"vitest": "1.6.0"
}
}
7 changes: 0 additions & 7 deletions packages/build-config/templates/vite/base.vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import { configDefaults } from 'vitest/config';

export default defineConfig({
build: {
sourcemap: true,
},
test: {
coverage: {
exclude: [...(configDefaults.coverage.exclude || []), '**/__fixtures__/**'],
},
},
});
13 changes: 13 additions & 0 deletions packages/build-config/templates/vite/base.vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig, configDefaults, mergeConfig } from 'vitest/config';
import baseConfig from './base.vite.config';

export default mergeConfig(
baseConfig,
defineConfig({
test: {
coverage: {
exclude: [...(configDefaults.coverage.exclude || []), '**/__fixtures__/**', '**/<%=*'],
},
},
}),
);
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@ag-grid-devtools/cli",
"version": "31.3.0",
"version": "32.0.0",
"license": "MIT",
"description": "AG Grid developer toolkit",
"author": "AG Grid <[email protected]>",
Expand Down Expand Up @@ -57,7 +57,7 @@
},
"peerDependencies": {
"eslint": "^8",
"typedoc": "^0.25",
"typedoc": "^0.26",
"typescript": "^5",
"vite": "^5",
"vitest": "^1"
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/utils/stdio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export function indentErrorMessage(error: any, options: { indent: string }) {
error instanceof CliError
? error.toString()
: error instanceof Error
? error.stack || error.message
: String(error);
? error.stack || error.message
: String(error);
return indentString(message, options);
}

Expand Down
3 changes: 1 addition & 2 deletions packages/cli/vitest.config.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="vitest" />
import { join, resolve } from 'path';
import { defineConfig, mergeConfig } from 'vite';
import { defineConfig, mergeConfig } from 'vitest/config';

import base from './vite.config.mts';

Expand Down
2 changes: 1 addition & 1 deletion packages/codemod-task-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"peerDependencies": {
"eslint": "^8",
"typedoc": "^0.25",
"typedoc": "^0.26",
"typescript": "^5",
"vite": "^5",
"vitest": "^1"
Expand Down
3 changes: 1 addition & 2 deletions packages/codemod-task-utils/vitest.config.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="vitest" />
import { join, resolve } from 'path';
import { defineConfig, mergeConfig } from 'vite';
import { defineConfig, mergeConfig } from 'vitest/config';

import base from './vite.config.mts';

Expand Down
8 changes: 4 additions & 4 deletions packages/codemod-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"@ag-grid-devtools/ast": "workspace:*",
"@ag-grid-devtools/types": "workspace:*",
"@ag-grid-devtools/utils": "workspace:*",
"@angular-eslint/template-parser": "17.0.1",
"@angular-eslint/template-parser": "17.5.2",
"@angular/compiler": "17.0.1",
"@typescript-eslint/types": "6.6.0",
"prettier": "3.2.5",
"@typescript-eslint/types": "7.14.1",
"prettier": "3.3.2",
"recast": "0.23.4",
"vue-eslint-parser": "9.3.2"
},
Expand All @@ -57,7 +57,7 @@
},
"peerDependencies": {
"eslint": "^8",
"typedoc": "^0.25",
"typedoc": "^0.26",
"typescript": "^5",
"vite": "^5",
"vitest": "^1"
Expand Down
4 changes: 2 additions & 2 deletions packages/codemod-utils/src/agGridHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ function retrieveObjectLiteralPropertyAccessor(
const key = property.isObjectProperty()
? property.get('key')
: property.isObjectMethod()
? property.get('key')
: null;
? property.get('key')
: null;
const computed = property.node.computed;
if (!key) return null;
return { key, computed, property };
Expand Down
30 changes: 15 additions & 15 deletions packages/codemod-utils/src/angularHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,10 @@ export function getAngularTemplateNodeChild<
): T[K] extends AngularAstNode
? AngularTemplateNode<T[K]>
: T[K] extends AngularAstNode | null
? AngularTemplateNode<Extract<T[K], AngularAstNode>> | null
: T[K] extends Array<AngularAstNode>
? Array<AngularTemplateNode<T[K][number]>>
: never {
? AngularTemplateNode<Extract<T[K], AngularAstNode>> | null
: T[K] extends Array<AngularAstNode>
? Array<AngularTemplateNode<T[K][number]>>
: never {
return getTemplateNodeChild(templateNode, key) as any;
}

Expand Down Expand Up @@ -550,16 +550,16 @@ function patchExistingAngularBoundAttributeNode(
]
: [`="${formatAngularExpression(updatedNode.value, templateSource)}"`]
: existingNode.valueSpan
? [
{
source: templateSource,
range: {
start: existingNode.valueSpan.start.offset,
end: existingNode.sourceSpan.end.offset,
? [
{
source: templateSource,
range: {
start: existingNode.valueSpan.start.offset,
end: existingNode.sourceSpan.end.offset,
},
},
},
]
: []),
]
: []),
]);
}

Expand Down Expand Up @@ -848,8 +848,8 @@ export function invertAngularBooleanExpression(expression: Angular.AST): Angular
const existingTruthinessValue = isTypedAngularExpressionNode(Angular.LiteralPrimitive, value)
? Boolean(value.value)
: isTypedAngularExpressionNode(Angular.EmptyExpr, value)
? true
: null;
? true
: null;
if (typeof existingTruthinessValue === 'boolean') {
const invertedValue = !existingTruthinessValue;
return createAngularBooleanLiteral(invertedValue);
Expand Down
6 changes: 3 additions & 3 deletions packages/codemod-utils/src/templateHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ function formatUpdatedNode<TRoot, TNode>(
return { path: [childKey, index], range: formatter.getNodeRange(child) };
})
: originalChild
? [{ path: [childKey], range: formatter.getNodeRange(originalChild) }]
: // FIXME: support optional template node child keys
[];
? [{ path: [childKey], range: formatter.getNodeRange(originalChild) }]
: // FIXME: support optional template node child keys
[];
})
.sort((a, b) => a.range.start - b.range.start);
if (childSlots.length === 0) return [{ source, range }];
Expand Down
Loading

0 comments on commit a475d4a

Please sign in to comment.