Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/all-symbols-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"aws-sdk-js-codemod": patch
---

Bump biome to v2
20 changes: 15 additions & 5 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
"files": {
"maxSize": 5242880,
"ignore": ["**/__fixtures__/**", "package.json"]
"includes": ["**", "!**/__fixtures__/**", "!**/package.json"]
},
"formatter": {
"enabled": true,
Expand All @@ -16,16 +16,26 @@
"noForEach": "off"
},
"correctness": {
"noNewSymbol": "error",
"noUndeclaredVariables": "error",
"noUnusedVariables": "error"
"noUnusedVariables": "error",
"noInvalidBuiltinInstantiation": "error"
},
"style": {
"noNamespace": "error",
"useConsistentArrayType": {
"level": "error",
"options": { "syntax": "shorthand" }
}
},
"noParameterAssign": "error",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error"
},
"suspicious": {
"noEmptyBlockStatements": "error"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"jscodeshift": "17.3.0"
},
"devDependencies": {
"@biomejs/biome": "1.9.0",
"@biomejs/biome": "2.0.0",
"@changesets/cli": "^2.29.4",
"@tsconfig/node18": "^18.2.4",
"@types/jscodeshift": "^17.3.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageImportsCode } from "./getV3PackageImportsCode";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageImportEqualsCode } from "./getV3PackageImportEqualsCode";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageImportsCode } from "./getV3PackageImportsCode";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageRequiresCode } from "./getV3PackageRequiresCode";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageRequiresCode } from "./getV3PackageRequiresCode";

Expand Down
1 change: 0 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ try {
({ options, positionalArguments } = parser.parse());
if (positionalArguments.length === 0 && !options.stdin) {
process.stderr.write(
// biome-ignore lint/style/useTemplate: This is a multiline string
"Error: You have to provide at least one file/directory to transform." +
"\n\n---\n\n" +
parser.getHelpText()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const removePromiseForCallExpression = (
}
default: {
emitWarning(
// biome-ignore lint/style/useTemplate: This is a multiline string
`Removal of .promise() not implemented for parentPath: ${callExpression.parentPath.value.type}\n` +
`Code processed: ${j(callExpression.parentPath).toSource()}\n\n` +
"Please report your use case on https://github.com/aws/aws-sdk-js-codemod\n"
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/v2-to-v3/apis/renameErrorCodeWithName.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {
ASTPath,
ArrowFunctionExpression,
ASTPath,
CallExpression,
Collection,
FunctionExpression,
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/v2-to-v3/apis/replaceAwsError.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Collection, JSCodeshift } from "jscodeshift";
import { type ImportType, addNamedModule } from "../modules";
import { addNamedModule, type ImportType } from "../modules";

export interface ReplaceAwsErrorOptions {
v2GlobalName?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/v2-to-v3/apis/replaceAwsIdentity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Collection, JSCodeshift, NewExpression } from "jscodeshift";
import { AWS_CREDENTIALS_MAP, AWS_TOKEN_MAP } from "../config";
import { type ImportType, addNamedModule } from "../modules";
import { addNamedModule, type ImportType } from "../modules";

export interface ReplaceAwsCredentialsOptions {
v2GlobalName?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/v2-to-v3/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ import {
} from "./modules";
import { removeTypesFromTSQualifiedName, replaceTSTypeReference } from "./ts-type";
import {
IndentationType,
getFormattedSourceString,
getMostUsedIndentationType,
getMostUsedStringLiteralQuote,
getValueIndentedWithTabs,
IndentationType,
isTrailingCommaUsed,
isTypeScriptFile,
} from "./utils";
Expand Down
76 changes: 38 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -429,18 +429,18 @@ __metadata:
languageName: node
linkType: hard

"@biomejs/biome@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/biome@npm:1.9.0"
dependencies:
"@biomejs/cli-darwin-arm64": "npm:1.9.0"
"@biomejs/cli-darwin-x64": "npm:1.9.0"
"@biomejs/cli-linux-arm64": "npm:1.9.0"
"@biomejs/cli-linux-arm64-musl": "npm:1.9.0"
"@biomejs/cli-linux-x64": "npm:1.9.0"
"@biomejs/cli-linux-x64-musl": "npm:1.9.0"
"@biomejs/cli-win32-arm64": "npm:1.9.0"
"@biomejs/cli-win32-x64": "npm:1.9.0"
"@biomejs/biome@npm:2.0.0":
version: 2.0.0
resolution: "@biomejs/biome@npm:2.0.0"
dependencies:
"@biomejs/cli-darwin-arm64": "npm:2.0.0"
"@biomejs/cli-darwin-x64": "npm:2.0.0"
"@biomejs/cli-linux-arm64": "npm:2.0.0"
"@biomejs/cli-linux-arm64-musl": "npm:2.0.0"
"@biomejs/cli-linux-x64": "npm:2.0.0"
"@biomejs/cli-linux-x64-musl": "npm:2.0.0"
"@biomejs/cli-win32-arm64": "npm:2.0.0"
"@biomejs/cli-win32-x64": "npm:2.0.0"
dependenciesMeta:
"@biomejs/cli-darwin-arm64":
optional: true
Expand All @@ -460,62 +460,62 @@ __metadata:
optional: true
bin:
biome: bin/biome
checksum: 10c0/b07ad2c8dc3d52c0a4eea37f98d36399b33a13759903aa65f9678db916810b773fe94937c304899158479bccd8c3c90f0f30af22b34d6dc5963774f1acc5e245
checksum: 10c0/a255d2e84e303c6b1bd841877463f358415a35fb39dc4051dec80d9dd44e4f2f546e7e13804f7cd9f0932ca11664600f819e0b0dd75c55c2c0571ed771d86cb5
languageName: node
linkType: hard

"@biomejs/cli-darwin-arm64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-darwin-arm64@npm:1.9.0"
"@biomejs/cli-darwin-arm64@npm:2.0.0":
version: 2.0.0
resolution: "@biomejs/cli-darwin-arm64@npm:2.0.0"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"@biomejs/cli-darwin-x64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-darwin-x64@npm:1.9.0"
"@biomejs/cli-darwin-x64@npm:2.0.0":
version: 2.0.0
resolution: "@biomejs/cli-darwin-x64@npm:2.0.0"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"@biomejs/cli-linux-arm64-musl@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-linux-arm64-musl@npm:1.9.0"
"@biomejs/cli-linux-arm64-musl@npm:2.0.0":
version: 2.0.0
resolution: "@biomejs/cli-linux-arm64-musl@npm:2.0.0"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard

"@biomejs/cli-linux-arm64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-linux-arm64@npm:1.9.0"
"@biomejs/cli-linux-arm64@npm:2.0.0":
version: 2.0.0
resolution: "@biomejs/cli-linux-arm64@npm:2.0.0"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard

"@biomejs/cli-linux-x64-musl@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-linux-x64-musl@npm:1.9.0"
"@biomejs/cli-linux-x64-musl@npm:2.0.0":
version: 2.0.0
resolution: "@biomejs/cli-linux-x64-musl@npm:2.0.0"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard

"@biomejs/cli-linux-x64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-linux-x64@npm:1.9.0"
"@biomejs/cli-linux-x64@npm:2.0.0":
version: 2.0.0
resolution: "@biomejs/cli-linux-x64@npm:2.0.0"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard

"@biomejs/cli-win32-arm64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-win32-arm64@npm:1.9.0"
"@biomejs/cli-win32-arm64@npm:2.0.0":
version: 2.0.0
resolution: "@biomejs/cli-win32-arm64@npm:2.0.0"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"@biomejs/cli-win32-x64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-win32-x64@npm:1.9.0"
"@biomejs/cli-win32-x64@npm:2.0.0":
version: 2.0.0
resolution: "@biomejs/cli-win32-x64@npm:2.0.0"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
Expand Down Expand Up @@ -1198,7 +1198,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "aws-sdk-js-codemod@workspace:."
dependencies:
"@biomejs/biome": "npm:1.9.0"
"@biomejs/biome": "npm:2.0.0"
"@changesets/cli": "npm:^2.29.4"
"@tsconfig/node18": "npm:^18.2.4"
"@types/jscodeshift": "npm:^17.3.0"
Expand Down