-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dynamodb-toolbox/init-repository
init repository
- Loading branch information
Showing
18 changed files
with
12,721 additions
and
2 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,6 @@ | ||
coverage | ||
node_modules | ||
**tests** | ||
\*.test.js | ||
dist | ||
docs |
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,44 @@ | ||
{ | ||
"env": { | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
"prettier" | ||
], | ||
"plugins": ["@typescript-eslint", "prefer-arrow", "unused-imports", "prettier", "import"], | ||
"parser": "@typescript-eslint/parser", | ||
"root": true, | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"import/extensions": ["error", "always"], | ||
"prettier/prettier": "error", | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": [ | ||
"error", | ||
"single", | ||
{ | ||
"allowTemplateLiterals": true, | ||
"avoidEscape": true | ||
} | ||
], | ||
"semi": ["error", "never"], | ||
// TODO: remove this rule when all the code is fully migrated to TS, atm it just produces a lot of noise | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
// TODO: remove this rule when all the code is fully migrated to TS, atm it just produces a lot of noise | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-non-null-assertion": "warn", | ||
"@typescript-eslint/consistent-type-imports": "error" | ||
}, | ||
"globals": { | ||
"expect": true, | ||
"it": true | ||
} | ||
} |
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,19 @@ | ||
name-template: 'v$RESOLVED_VERSION 🌈' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
version-resolver: | ||
major: | ||
labels: | ||
- major | ||
minor: | ||
labels: | ||
- minor | ||
patch: | ||
labels: | ||
- patch | ||
default: patch | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' | ||
template: | | ||
## Changes | ||
$CHANGES |
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,26 @@ | ||
name: 📝 Draft or update next release | ||
concurrency: draft_or_update_next_release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: read | ||
|
||
jobs: | ||
prepare-deployment: | ||
name: 📝 Draft or update next release | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: ♻️ Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: 📝 Release/Draft next release | ||
uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Release | ||
|
||
on: | ||
# This job runs when a new release is published | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ♻️ Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏗️ Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | ||
|
||
# Store the name of the release | ||
# See https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | ||
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- run: echo "RELEASE_NPM_TAG=${{ github.event.release.prerelease && 'alpha' || 'latest' }}" >> $GITHUB_ENV | ||
- run: npm ci | ||
- run: npm version $RELEASE_VERSION --no-git-tag-version | ||
- run: npm run build | ||
- run: npm publish --access public --tag $RELEASE_NPM_TAG | ||
env: | ||
NODE_AUTH_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'Pull Request' | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [16, 18, 20] | ||
typescript: ['~4.9.5', '~5.0.4', '~5.1.6', '~5.2.2', '~5.3.3', '~5.4.2', 'latest'] | ||
name: Node ${{ matrix.node }} / TS ${{ matrix.typescript }} | ||
steps: | ||
- name: ♻️ Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: 🏗️ Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: 🚚 Install dependencies | ||
run: npm ci --legacy-peer-deps | ||
|
||
- name: 📌 Install TS at correct version | ||
run: npm i typescript@${{ matrix.typescript }} | ||
|
||
- name: 🎯 Run tests | ||
run: npm 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,18 @@ | ||
# package directories | ||
node_modules | ||
jspm_packages | ||
|
||
# local os | ||
dump.rdb | ||
|
||
# coverage | ||
coverage | ||
|
||
# dist | ||
dist | ||
|
||
# dev env settings | ||
.vscode | ||
|
||
# for test-exports script | ||
dynamodb-toolshack-*.tgz |
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,14 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"bracketSpacing": true, | ||
"printWidth": 100, | ||
"semi": false, | ||
"arrowParens": "avoid", | ||
"plugins": ["@trivago/prettier-plugin-sort-imports"], | ||
"importOrder": ["^~/(.*)$", "^[./]"], | ||
"importOrderSortSpecifiers": true, | ||
"importOrderGroupNamespaceSpecifiers": true, | ||
"importOrderSeparation": true, | ||
"importOrderParserPlugins": ["typescript", "decorators"] | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
# dynamodb-toolshack | ||
# DynamoDB-Toolshack |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.