diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..f3a83ed7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,72 @@ +name: build +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build: + name: Build + # Set the type of machine to run on + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [ 12.x, 14.x, 15.x ] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + always-auth: true + node-version: ${{ matrix.node-version }} + registry-url: https://registry.npmjs.org + scope: '@awslabs-community-fork' + - run: npm install -g npm@latest + - run: npm ci + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm run bootstrap + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm run build + - run: npm run test + + publish: + name: Publish + needs: build + if: github.ref == 'refs/heads/master' && github.event_name == 'push' + + # Set the type of machine to run on + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14.x + uses: actions/setup-node@v2 + with: + always-auth: true + node-version: 14.x + registry-url: https://registry.npmjs.org + scope: '@awslabs-community-fork' + - run: npm install -g npm@latest + - run: npm ci + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm run bootstrap + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm run build + - run: git config --global user.name 'ima-bot' + - run: git config --global user.email 'ima-bot@ima-tech.ca' + - run: npm run bump-patch + - run: npm whoami + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm run publish-ci + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index a302e8be..56e828d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ yarn.lock -package-lock.json .idea/ # Created by .ignore support plugin (hsz.mobi) @@ -30,3 +29,7 @@ typings/ *.tgz .yarn-integrity .env + +dist + +.npmrc diff --git a/README.md b/README.md index 7776af8f..d846f28a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ + +# This is a community fork +We are planning to merge it back if AWS allows it. Meanwhile, enjoy: + +* SDK v3 support + + +To install: + +``` +npm install aws-community-fork/dynamodb-data-mapper +``` + # Amazon DynamoDB DataMapper For JavaScript [](http://aws.amazon.com/apache-2-0/) @@ -7,10 +20,10 @@ document mapper for JavaScript applications using Amazon DynamoDB. ## Getting started -[The `@aws/dynamodb-data-mapper` package](packages/dynamodb-data-mapper) provides +[The `@awslabs-community-fork/dynamodb-data-mapper` package](packages/dynamodb-data-mapper) provides a simple way to persist and load an application's domain objects to and from Amazon DynamoDB. When used together with the decorators provided by [the -`@aws/dynamodb-data-mapper-annotations` package](packages/dynamodb-data-mapper-annotations), +`@awslabs-community-fork/dynamodb-data-mapper-annotations` package](packages/dynamodb-data-mapper-annotations), you can describe the relationship between a class and its representation in DynamoDB by adding a few decorators: @@ -20,7 +33,7 @@ import { hashKey, rangeKey, table, -} from '@aws/dynamodb-data-mapper-annotations'; +} from '@awslabs-community-fork/dynamodb-data-mapper-annotations'; @table('table_name') class MyDomainObject { @@ -39,7 +52,7 @@ With domain classes defined, you can interact with records in DynamoDB via an instance of `DataMapper`: ```typescript -import {DataMapper} from '@aws/dynamodb-data-mapper'; +import {DataMapper} from '@awslabs-community-fork/dynamodb-data-mapper'; import DynamoDB = require('aws-sdk/clients/dynamodb'); const mapper = new DataMapper({ @@ -193,7 +206,7 @@ import { AttributePath, FunctionExpression, UpdateExpression, -} from '@aws/dynamodb-expressions'; +} from '@awslabs-community-fork/dynamodb-expressions'; const expr = new UpdateExpression(); diff --git a/docs/index.html b/docs/index.html index 0fe02346..aa619bc9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -67,10 +67,10 @@
This repository hosts several packages that collectively make up an object to document mapper for JavaScript applications using Amazon DynamoDB.
The @aws/dynamodb-data-mapper
package provides
+
The @awslabs-community-fork/dynamodb-data-mapper
package provides
a simple way to persist and load an application's domain objects to and from
Amazon DynamoDB. When used together with the decorators provided by the
- @aws/dynamodb-data-mapper-annotations
package,
+ @awslabs-community-fork/dynamodb-data-mapper-annotations
package,
you can describe the relationship between a class and its representation in
DynamoDB by adding a few decorators:
import {
@@ -78,7 +78,7 @@ Getting started
hashKey,
rangeKey,
table,
-} from '@aws/dynamodb-data-mapper-annotations';
+} from '@awslabs-community-fork/dynamodb-data-mapper-annotations';
@table('table_name')
class MyDomainObject {
@@ -94,7 +94,7 @@ Getting started
With domain classes defined, you can interact with records in DynamoDB via an
instance of DataMapper
:
import {DataMapper} from '@aws/dynamodb-data-mapper';
+ import {DataMapper} from '@awslabs-community-fork/dynamodb-data-mapper';
import DynamoDB = require('aws-sdk/clients/dynamodb');
const mapper = new DataMapper({
@@ -312,4 +312,4 @@ Legend