Skip to content

Commit 91ec885

Browse files
authored
Copy configuration from aws-sdk-js-v2-to-v3 (#2)
1 parent 372f263 commit 91ec885

24 files changed

+8566
-5
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/mean-cats-poke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"aws-sdk-js-codemod": patch
3+
---
4+
5+
Copy configuration from trivikr/aws-sdk-js-v2-to-v3

.eslintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint", "simple-import-sort"],
5+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
6+
"rules": {
7+
"simple-import-sort/imports": "error",
8+
"simple-import-sort/exports": "error"
9+
},
10+
"ignorePatterns": ["__testfixtures__"]
11+
}

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
title: "[Bug?]: "
4+
labels: ["bug", "triage"]
5+
6+
body:
7+
- type: checkboxes
8+
id: selfservice
9+
attributes:
10+
label: Self-service
11+
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."
12+
options:
13+
- label: "I'd be willing to implement a fix"
14+
15+
- type: textarea
16+
attributes:
17+
label: Describe the bug
18+
description: |
19+
A clear and concise description of what the bug is. A bug is **unintended**. A feature not being implemented is **not a bug**.
20+
placeholder: |
21+
eg: Running aws-sdk-js-v2-to-v3 transform on provided input causes it to crash.
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
attributes:
27+
label: Steps to reproduce
28+
description: |
29+
The _minimal_ information needed to reproduce your issue (ideally provided input, and expected output).
30+
placeholder: |
31+
### Input
32+
```ts
33+
import AWS from "aws-sdk";
34+
35+
const region = "us-west-2";
36+
const client = new AWS.DynamoDB({ region });
37+
const response = await client.listTables({}).promise();
38+
```
39+
40+
### Observed Output
41+
```ts
42+
```
43+
44+
### Expected Output
45+
```ts
46+
import { DynamoDB } from "@aws-sdk/client-dynamodb";
47+
48+
const region = "us-west-2";
49+
const client = new DynamoDB({ region });
50+
const response = await client.listTables({});
51+
```
52+
validations:
53+
required: true
54+
55+
- type: textarea
56+
attributes:
57+
label: Environment
58+
render: shell
59+
description: |
60+
Run `node -v` and `jscodeshift -v` and paste the result into the form
61+
placeholder: |
62+
node version: v16.14.0
63+
64+
jscodeshift: 0.13.1
65+
- babel: 7.17.5
66+
- babylon: 7.17.3
67+
- flow: 0.172.0
68+
- recast: 0.20.5
69+
validations:
70+
required: true
71+
72+
- type: textarea
73+
attributes:
74+
label: Additional context
75+
description: |
76+
Add any other context about the problem here. Or a screenshot if applicable.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Feature Request
2+
description: These issues are for **concrete and actionable proposals**. If you just have
3+
a general problem that you would like to brainstorm, open a Discussion instead.
4+
title: "[Feature]: "
5+
labels: ["enhancement"]
6+
7+
body:
8+
- type: checkboxes
9+
id: selfservice
10+
attributes:
11+
label: Self-service
12+
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."
13+
options:
14+
- label: "I'd be willing to implement this feature"
15+
16+
- type: textarea
17+
attributes:
18+
label: Provide a minimal code for which transform does not work
19+
description: |
20+
A clear and concise description along with the code snippet for which the transform does not work.
21+
placeholder: |
22+
```ts
23+
import AWS from "aws-sdk";
24+
25+
const region = "us-west-2";
26+
const client = new AWS.DynamoDB({ region });
27+
const response = await client.listTables({}).promise();
28+
```
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
attributes:
34+
label: Expected Output
35+
description: |
36+
The expected output of the provided code snippet.
37+
placeholder: |
38+
```ts
39+
import { DynamoDB } from "@aws-sdk/client-dynamodb";
40+
41+
const region = "us-west-2";
42+
const client = new DynamoDB({ region });
43+
const response = await client.listTables({});
44+
```
45+
46+
- type: textarea
47+
attributes:
48+
label: Additional context
49+
description: |
50+
Add any other context about the problem here. Or a screenshot if applicable.

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: build
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [12.x, 14.x, 16.x]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- name: Install dependencies
21+
run: yarn
22+
- run: yarn build
23+
- run: yarn lint
24+
- run: yarn test

.github/workflows/pull_request.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: pull_request
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
call-build:
9+
uses: ./.github/workflows/build.yml

.github/workflows/push.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: push
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
call-build:
9+
uses: ./.github/workflows/build.yml
10+
release:
11+
needs: call-build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@v2
16+
with:
17+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
18+
fetch-depth: 0
19+
20+
- name: Setup Node.js 16.x
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: "16"
24+
25+
- name: Install Dependencies
26+
run: yarn
27+
28+
- name: Create Release Pull Request or Publish to npm
29+
id: changesets
30+
uses: changesets/action@v1
31+
with:
32+
publish: yarn release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,11 @@ dist
102102

103103
# TernJS port file
104104
.tern-port
105+
106+
.pnp.*
107+
.yarn/*
108+
!.yarn/patches
109+
!.yarn/plugins
110+
!.yarn/releases
111+
!.yarn/sdks
112+
!.yarn/versions

0 commit comments

Comments
 (0)