Skip to content

Commit e6fa8b1

Browse files
authored
chore(signature-v4): using ES2017 on sigv4 package and ES5 for sigv4 browser entry (#361)
1 parent d072752 commit e6fa8b1

File tree

16 files changed

+101
-15
lines changed

16 files changed

+101
-15
lines changed

buildspec.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 0.2
2+
3+
phases:
4+
install:
5+
runtime-versions:
6+
nodejs: 10
7+
commands:
8+
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.17.3
9+
- export PATH="$HOME/.yarn/bin:$PATH"
10+
- yarn
11+
build:
12+
commands:
13+
- echo Executing unit tests
14+
- yarn test

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"clear-build-info": "rimraf ./packages/*/*.tsbuildinfo ./clients/*/*/*.tsbuildinfo",
1212
"copy-models": "node ./scripts/copyModels.js",
1313
"update-clients": "node ./packages/package-generator/build/cli.js import-all --matching './models/*/*/service-2.json'",
14-
"pretest": "lerna run pretest --since 'HEAD^' --include-filtered-dependents --include-filtered-dependencies",
14+
"build-crypto-dependencies": "lerna run --scope '@aws-sdk/types' --scope '@aws-sdk/util-utf8-browser' --scope '@aws-sdk/util-locate-window' --scope '@aws-sdk/hash-node' --include-filtered-dependencies pretest",
15+
"pretest": "yarn build-crypto-dependencies && lerna run pretest --since 'master' --include-filtered-dependencies",
1516
"test": "jest --coverage --passWithNoTests",
1617
"pretest-all": "lerna run pretest",
1718
"test-all": "jest --coverage"

packages/signature-v4-browser/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/build/
33
/coverage/
44
/docs/
5+
/dist/
56
*.tsbuildinfo
67
*.tgz
78
*.log

packages/signature-v4-browser/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
"description": "A standalone AWS Signature V4 request signer for browser JavaScript",
44
"version": "0.1.0-preview.6",
55
"scripts": {
6-
"prepublishOnly": "tsc",
6+
"build:cjs": "tsc -p ./tsconfig.test.json",
7+
"build:es": "tsc -p ./tsconfig.es.json",
8+
"build": "yarn build:es && yarn build:cjs",
9+
"prepublishOnly": "yarn build",
710
"pretest": "tsc -p tsconfig.test.json",
811
"test": "jest"
912
},
1013
"main": "./build/index.js",
1114
"types": "./build/index.d.ts",
15+
"browser": "./dist/es/index.js",
1216
"author": {
1317
"name": "AWS SDK for JavaScript Team",
1418
"url": "https://aws.amazon.com/javascript/"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"target": "es5",
5+
"module": "esNext",
6+
"moduleResolution": "node",
7+
"lib": ["dom", "es5", "es2015.promise", "es2015.collection"],
8+
"declaration": true,
9+
"sourceMap": true,
10+
"strict": true,
11+
"stripInternal": true,
12+
"rootDir": "./src",
13+
"outDir": "./dist/es",
14+
"importHelpers": true,
15+
"noEmitHelpers": true,
16+
"noUnusedLocals": true,
17+
"incremental": true
18+
}
19+
}

packages/signature-v4-browser/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es2017",
44
"module": "commonjs",
55
"declaration": true,
66
"strict": true,
77
"sourceMap": true,
8-
"lib": ["dom", "es5", "es2015.promise", "es2015.collection"],
8+
"stripInternal": true,
99
"rootDir": "./src",
1010
"outDir": "./build",
1111
"importHelpers": true,

packages/signature-v4-universal/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/build/
33
/coverage/
44
/docs/
5+
/dist/
56
*.tsbuildinfo
67
*.tgz
78
*.log

packages/signature-v4-universal/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
"description": "A standalone AWS Signature V4 request signer targeting all JS environments",
44
"version": "0.1.0-preview.6",
55
"scripts": {
6-
"prepublishOnly": "tsc",
6+
"build:cjs": "tsc -p ./tsconfig.test.json",
7+
"build:es": "tsc -p ./tsconfig.es.json",
8+
"build": "yarn build:es && yarn build:cjs",
9+
"prepublishOnly": "yarn build",
710
"pretest": "tsc -p tsconfig.test.json",
811
"test": "jest"
912
},
1013
"main": "./build/index.js",
1114
"types": "./build/index.d.ts",
15+
"browser": "./dist/es/index.js",
1216
"author": {
1317
"name": "AWS SDK for JavaScript Team",
1418
"url": "https://aws.amazon.com/javascript/"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"target": "es5",
5+
"module": "esNext",
6+
"moduleResolution": "node",
7+
"lib": ["dom", "es5", "es2015.promise", "es2015.collection"],
8+
"declaration": true,
9+
"sourceMap": true,
10+
"strict": true,
11+
"stripInternal": true,
12+
"rootDir": "./src",
13+
"outDir": "./dist/es",
14+
"importHelpers": true,
15+
"noEmitHelpers": true,
16+
"noUnusedLocals": true,
17+
"incremental": true
18+
}
19+
}

packages/signature-v4-universal/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es2017",
44
"module": "commonjs",
55
"declaration": true,
66
"strict": true,
77
"sourceMap": true,
8-
"lib": ["dom", "es5", "es2015.promise", "es2015.collection"],
8+
"stripInternal": true,
99
"rootDir": "./src",
1010
"outDir": "./build",
1111
"importHelpers": true,

0 commit comments

Comments
 (0)