Skip to content

Commit

Permalink
fix: dist folder for browser/node/universal signer package
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Jan 13, 2020
1 parent de4795c commit f42a420
Show file tree
Hide file tree
Showing 17 changed files with 116 additions and 118 deletions.
1 change: 1 addition & 0 deletions packages/signature-v4-browser/.npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/src/
/coverage/
/docs/
/build/
tsconfig.test.json
*.tsbuildinfo

Expand Down
4 changes: 3 additions & 1 deletion packages/signature-v4-browser/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const base = require("../../jest.config.base.js");

module.exports = {
...base
...base,
//only test build dist, avoid testing the package twice
testPathIgnorePatterns: ["/node_modules/", "/dist/"]
};
14 changes: 7 additions & 7 deletions packages/signature-v4-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"description": "A standalone AWS Signature V4 request signer for browser JavaScript",
"version": "1.0.0-alpha.3",
"scripts": {
"build:cjs": "tsc -p ./tsconfig.test.json",
"build:es": "tsc -p ./tsconfig.es.json",
"build": "yarn build:es && yarn build:cjs",
"build:cjs": "tsc -p tsconfig.json",
"build:es": "tsc -p tsconfig.es.json",
"build": "yarn build:es",
"prepublishOnly": "yarn build",
"pretest": "tsc -p tsconfig.test.json",
"pretest": "tsc -p tsconfig.json",
"test": "jest"
},
"main": "./build/index.js",
"types": "./build/index.d.ts",
"browser": "./dist/es/index.js",
"main": "./dist/es/index.js",
"types": "./dist/es/index.d.ts",
"module": "./dist/es/index.js",
"author": {
"name": "AWS SDK for JavaScript Team",
"url": "https://aws.amazon.com/javascript/"
Expand Down
2 changes: 1 addition & 1 deletion packages/signature-v4-browser/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
requests,
service,
signingDate
} from "@aws-sdk/signature-v4/build/suite.fixture";
} from "@aws-sdk/signature-v4/dist/cjs/suite.fixture";

/**
* Executes the official AWS Signature Version 4 test suite.
Expand Down
11 changes: 0 additions & 11 deletions packages/signature-v4-browser/tsconfig.test.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/signature-v4-node/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
requests,
service,
signingDate
} from "@aws-sdk/signature-v4/build/suite.fixture";
} from "@aws-sdk/signature-v4/dist/cjs/suite.fixture";

/**
* Executes the official AWS Signature Version 4 test suite.
Expand Down
1 change: 1 addition & 0 deletions packages/signature-v4-universal/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/coverage/
/docs/
/dist/
/types/
*.tsbuildinfo
*.tgz
*.log
Expand Down
4 changes: 3 additions & 1 deletion packages/signature-v4-universal/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const base = require("../../jest.config.base.js");

module.exports = {
...base
...base,
//only test cjs dist, avoid testing the package twice
testPathIgnorePatterns: ["/node_modules/", "/es/"]
};
10 changes: 5 additions & 5 deletions packages/signature-v4-universal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"description": "A standalone AWS Signature V4 request signer targeting all JS environments",
"version": "1.0.0-alpha.3",
"scripts": {
"build:cjs": "tsc -p ./tsconfig.test.json",
"build:es": "tsc -p ./tsconfig.es.json",
"build:cjs": "tsc -p tsconfig.json",
"build:es": "tsc -p tsconfig.es.json",
"build": "yarn build:es && yarn build:cjs",
"prepublishOnly": "yarn build",
"pretest": "tsc -p tsconfig.test.json",
"pretest": "yarn build",
"test": "jest"
},
"main": "./build/index.js",
"types": "./build/index.d.ts",
"main": "./dist/cjs/index.js",
"types": "./types/index.d.ts",
"browser": "./dist/es/index.js",
"author": {
"name": "AWS SDK for JavaScript Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/signature-v4-universal/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
requests,
service,
signingDate
} from "@aws-sdk/signature-v4/build/suite.fixture";
} from "@aws-sdk/signature-v4/dist/cjs/suite.fixture";

/**
* Executes the official AWS Signature Version 4 test suite.
Expand Down
3 changes: 2 additions & 1 deletion packages/signature-v4-universal/tsconfig.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"module": "esNext",
"moduleResolution": "node",
"lib": ["dom", "es5", "es2015.promise", "es2015.collection"],
"declaration": true,
"declaration": false,
"declarationDir": null,
"sourceMap": true,
"strict": true,
"stripInternal": true,
Expand Down
3 changes: 2 additions & 1 deletion packages/signature-v4-universal/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"target": "es2017",
"module": "commonjs",
"declaration": true,
"declarationDir": "./types",
"strict": true,
"sourceMap": true,
"stripInternal": true,
"rootDir": "./src",
"outDir": "./build",
"outDir": "./dist/cjs",
"importHelpers": true,
"noEmitHelpers": true,
"incremental": true
Expand Down
11 changes: 0 additions & 11 deletions packages/signature-v4-universal/tsconfig.test.json

This file was deleted.

6 changes: 3 additions & 3 deletions packages/signature-v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "./dist/cjs/index.js",
"module": "./dist/es/index.js",
"scripts": {
"build:cjs": "tsc -p ./tsconfig.json",
"build:es": "tsc -p ./tsconfig.es.json",
"build:cjs": "tsc -p tsconfig.json",
"build:es": "tsc -p tsconfig.es.json",
"build": "node scripts/buildSuiteFixture.js && yarn build:es && yarn build:cjs",
"prepublishOnly": "yarn build",
"pretest": "yarn build",
Expand All @@ -33,5 +33,5 @@
"jest": "^24.7.1",
"typescript": "~3.4.0"
},
"types": "./types/index.d.ts"
"types": "./dist/cjs/index.d.ts"
}
Loading

0 comments on commit f42a420

Please sign in to comment.