-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy configuration from aws-sdk-js-v2-to-v3 (#2)
- Loading branch information
Showing
24 changed files
with
8,566 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"aws-sdk-js-codemod": patch | ||
--- | ||
|
||
Copy configuration from trivikr/aws-sdk-js-v2-to-v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint", "simple-import-sort"], | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"rules": { | ||
"simple-import-sort/imports": "error", | ||
"simple-import-sort/exports": "error" | ||
}, | ||
"ignorePatterns": ["__testfixtures__"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Bug Report | ||
description: Create a report to help us improve | ||
title: "[Bug?]: " | ||
labels: ["bug", "triage"] | ||
|
||
body: | ||
- type: checkboxes | ||
id: selfservice | ||
attributes: | ||
label: Self-service | ||
description: "Fixing bugs is always a great way to give back to open-source projects, and we're more than happy to answer questions and provide context." | ||
options: | ||
- label: "I'd be willing to implement a fix" | ||
|
||
- type: textarea | ||
attributes: | ||
label: Describe the bug | ||
description: | | ||
A clear and concise description of what the bug is. A bug is **unintended**. A feature not being implemented is **not a bug**. | ||
placeholder: | | ||
eg: Running aws-sdk-js-v2-to-v3 transform on provided input causes it to crash. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Steps to reproduce | ||
description: | | ||
The _minimal_ information needed to reproduce your issue (ideally provided input, and expected output). | ||
placeholder: | | ||
### Input | ||
```ts | ||
import AWS from "aws-sdk"; | ||
const region = "us-west-2"; | ||
const client = new AWS.DynamoDB({ region }); | ||
const response = await client.listTables({}).promise(); | ||
``` | ||
### Observed Output | ||
```ts | ||
``` | ||
### Expected Output | ||
```ts | ||
import { DynamoDB } from "@aws-sdk/client-dynamodb"; | ||
const region = "us-west-2"; | ||
const client = new DynamoDB({ region }); | ||
const response = await client.listTables({}); | ||
``` | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Environment | ||
render: shell | ||
description: | | ||
Run `node -v` and `jscodeshift -v` and paste the result into the form | ||
placeholder: | | ||
node version: v16.14.0 | ||
jscodeshift: 0.13.1 | ||
- babel: 7.17.5 | ||
- babylon: 7.17.3 | ||
- flow: 0.172.0 | ||
- recast: 0.20.5 | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: | | ||
Add any other context about the problem here. Or a screenshot if applicable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Feature Request | ||
description: These issues are for **concrete and actionable proposals**. If you just have | ||
a general problem that you would like to brainstorm, open a Discussion instead. | ||
title: "[Feature]: " | ||
labels: ["enhancement"] | ||
|
||
body: | ||
- type: checkboxes | ||
id: selfservice | ||
attributes: | ||
label: Self-service | ||
description: "Adding features is a great way to give back to open-source projects, and we're more than happy to answer questions and provide context." | ||
options: | ||
- label: "I'd be willing to implement this feature" | ||
|
||
- type: textarea | ||
attributes: | ||
label: Provide a minimal code for which transform does not work | ||
description: | | ||
A clear and concise description along with the code snippet for which the transform does not work. | ||
placeholder: | | ||
```ts | ||
import AWS from "aws-sdk"; | ||
const region = "us-west-2"; | ||
const client = new AWS.DynamoDB({ region }); | ||
const response = await client.listTables({}).promise(); | ||
``` | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Expected Output | ||
description: | | ||
The expected output of the provided code snippet. | ||
placeholder: | | ||
```ts | ||
import { DynamoDB } from "@aws-sdk/client-dynamodb"; | ||
const region = "us-west-2"; | ||
const client = new DynamoDB({ region }); | ||
const response = await client.listTables({}); | ||
``` | ||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: | | ||
Add any other context about the problem here. Or a screenshot if applicable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: build | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [12.x, 14.x, 16.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: yarn | ||
- run: yarn build | ||
- run: yarn lint | ||
- run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: pull_request | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
call-build: | ||
uses: ./.github/workflows/build.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: push | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
call-build: | ||
uses: ./.github/workflows/build.yml | ||
release: | ||
needs: call-build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js 16.x | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16" | ||
|
||
- name: Install Dependencies | ||
run: yarn | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: yarn release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__testfixtures__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"printWidth": 100 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["arcanis.vscode-zipfs"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"editor.tabSize": 2, | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.rulers": [80, 120], | ||
"search.exclude": { | ||
"**/.yarn": true, | ||
"**/.pnp.*": true | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This file is automatically generated by @yarnpkg/sdks. | ||
# Manual changes might be lost! | ||
|
||
integrations: | ||
- vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-3.2.0.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ | ||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
testMatch: ["**/*.spec.ts"] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,65 @@ | ||
{ | ||
"name": "aws-sdk-js-codemod", | ||
"version": "0.0.1", | ||
"description": "Codemods for AWS SDK for JavaScript", | ||
"main": "dist/index.js", | ||
"repository": "[email protected]:trivikr/aws-sdk-js-codemod.git", | ||
"author": "Kamat, Trivikram <[email protected]>", | ||
"description": "Collection of codemod scripts that help update AWS SDK for JavaScript APIs", | ||
"keywords": [ | ||
"jscodeshift", | ||
"transform", | ||
"aws", | ||
"sdk", | ||
"javascript", | ||
"v2", | ||
"v3", | ||
"migration" | ||
], | ||
"homepage": "https://github.com/trivikr/aws-sdk-js-codemod", | ||
"license": "MIT", | ||
"private": false | ||
"author": "Kamat, Trivikram <[email protected]>", | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "dist/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/trivikr/aws-sdk-js-codemod.git" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"lint": "eslint 'src/*.ts'", | ||
"release": "yarn build && changeset publish", | ||
"test": "jest", | ||
"postinstall": "simple-git-hooks" | ||
}, | ||
"dependencies": { | ||
"jscodeshift": "0.13.1", | ||
"jscodeshift-find-imports": "2.0.4" | ||
}, | ||
"devDependencies": { | ||
"@changesets/cli": "2.21.0", | ||
"@tsconfig/node12": "1.0.2", | ||
"@types/jest": "27.4.1", | ||
"@types/jscodeshift": "0.11.3", | ||
"@types/node": "16.11.26", | ||
"@typescript-eslint/eslint-plugin": "5.13.0", | ||
"@typescript-eslint/parser": "5.13.0", | ||
"eslint": "8.10.0", | ||
"eslint-plugin-simple-import-sort": "7.0.0", | ||
"jest": "27.5.1", | ||
"lint-staged": "12.3.4", | ||
"prettier": "2.5.1", | ||
"simple-git-hooks": "2.7.0", | ||
"ts-jest": "27.1.3", | ||
"typescript": "4.5.5" | ||
}, | ||
"engines": { | ||
"node": ">=12.0.0" | ||
}, | ||
"packageManager": "[email protected]", | ||
"lint-staged": { | ||
"*.ts": [ | ||
"eslint --fix", | ||
"prettier --write" | ||
], | ||
"*.{json,md}": "prettier --write" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"pre-commit": "npx lint-staged" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { answer } from "./index"; | ||
|
||
it("answer is 42", () => { | ||
expect(answer).toBe(42); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const answer = 42; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "@tsconfig/node12/tsconfig.json", | ||
"compilerOptions": { | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"outDir": "dist", | ||
"rootDir": "src" | ||
}, | ||
"exclude": ["**/dist/**", "**/__tests__/**", "**/__testfixtures__/**"] | ||
} |
Oops, something went wrong.