Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(client-s3): publish files in dist-* #7

Merged
merged 11 commits into from
Sep 17, 2021
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Testing install size reduction on @aws-sdk/client-s3

### v0.1.0

The version v0.0.1 added in [#6](https://github.com/trivikr/temp-client-s3/pull/6)
The version v0.1.0 added in [#6](https://github.com/trivikr/temp-client-s3/pull/6)
contains source code of **@aws-sdk/client-s3@3.28.0**

```console
Expand All @@ -16,3 +16,12 @@ package size: 1.6 MB
unpacked size: 10.2 MB
total files: 806
```

### v0.2.0

The version v0.2.0 added in [#7](https://github.com/trivikr/temp-client-s3/pull/7)
publishes only files in dist folders.

```console
Update after publish
```
4 changes: 2 additions & 2 deletions clients/client-s3/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module.exports = function (config) {
config.set({
basePath: "",
frameworks: ["mocha", "chai"],
files: ["e2e/**/*.ispec.ts"],
files: ["test/e2e/**/*.ispec.ts"],
preprocessors: {
"e2e/**/*.ispec.ts": ["webpack", "sourcemap", "credentials", "env"],
"test/e2e/**/*.ispec.ts": ["webpack", "sourcemap", "credentials", "env"],
},
webpackMiddleware: {
stats: "minimal",
Expand Down
24 changes: 13 additions & 11 deletions clients/client-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,30 @@
"description": "Testing install size reduction in @aws-sdk/client-s3",
"version": "0.1.0",
"scripts": {
"clean": "yarn remove-definitions && yarn remove-dist && yarn remove-documentation",
"clean": "yarn remove-dist && yarn remove-documentation",
"build-documentation": "yarn remove-documentation && typedoc ./",
"remove-definitions": "rimraf ./types",
"remove-dist": "rimraf ./dist",
"remove-dist": "rimraf ./dist-*",
"remove-documentation": "rimraf ./docs",
"test:unit": "mocha **/cjs/**/*.spec.js",
"test:e2e": "mocha **/cjs/**/*.ispec.js && karma start karma.conf.js",
"test:unit": "ts-mocha src/**/*.spec.ts",
"test:e2e": "ts-mocha test/**/*.ispec.ts && karma start karma.conf.js",
"test": "yarn test:unit",
"build:cjs": "tsc -p tsconfig.json",
"build:es": "tsc -p tsconfig.es.json",
"build": "yarn build:cjs && yarn build:es",
"downlevel-dts": "downlevel-dts dist/types dist/types/ts3.4"
"downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4"
},
"main": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts",
"module": "./dist/es/index.js",
"main": "./dist-cjs/index.js",
"types": "./dist-types/index.d.ts",
"module": "./dist-es/index.js",
"browser": {
"./runtimeConfig": "./runtimeConfig.browser"
},
"react-native": {
"./runtimeConfig": "./runtimeConfig.native"
},
"files": [
"dist-*"
],
"sideEffects": false,
"dependencies": {
"@aws-crypto/sha256-browser": "^1.0.0",
Expand Down Expand Up @@ -92,8 +94,8 @@
},
"typesVersions": {
"<4.0": {
"dist/types/*": [
"dist/types/ts3.4/*"
"dist-types/*": [
"dist-types/ts3.4/*"
]
}
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import packageInfo from "./package.json";
// @ts-ignore: package.json will be imported from dist folders
import packageInfo from "../package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-browser";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import packageInfo from "./package.json";
// @ts-ignore: package.json will be imported from dist folders
import packageInfo from "../package.json";

import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import chai from "chai";
import chaiAsPromised from "chai-as-promised";
import { S3 } from "../index";
import { S3 } from "../../src/index";
import { Credentials } from "@aws-sdk/types";
import { createBuffer } from "./helpers";
chai.use(chaiAsPromised);
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions clients/client-s3/tsconfig.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"target": "es5",
"module": "esnext",
"moduleResolution": "node",
"declaration": false,
"declarationDir": null,
"declaration": true,
"declarationDir": "dist-types",
"lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"],
"outDir": "dist/es"
"outDir": "dist-es"
}
}
8 changes: 4 additions & 4 deletions clients/client-s3/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"rootDir": "./src",
"alwaysStrict": true,
"target": "ES2018",
"module": "commonjs",
"declaration": true,
"strict": true,
"sourceMap": true,
"downlevelIteration": true,
Expand All @@ -12,8 +12,7 @@
"incremental": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"declarationDir": "./dist/types",
"outDir": "dist/cjs",
"outDir": "dist-cjs",
"types": ["mocha", "node"]
},
"typedocOptions": {
Expand All @@ -29,5 +28,6 @@
"out": "./docs",
"theme": "minimal",
"plugin": ["@aws-sdk/client-documentation-generator"]
}
},
"exclude": ["test/**/*", "src/**/*.spec.ts"]
}