Skip to content

Commit d78f739

Browse files
author
Florian Chazal
committed
rename uber to bundle
1 parent b441615 commit d78f739

File tree

9 files changed

+19
-21
lines changed

9 files changed

+19
-21
lines changed

.github/workflows/pr_lint_and_test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Packages size report
6060
uses: flochaz/[email protected]
6161
with:
62-
build-command: mkdir dist && npm run lerna-package && npm run lerna-package-uber-zip && bash -c "mv ./packages/*/dist/* dist/" && ls dist
62+
build-command: mkdir dist && npm run lerna-package && npm run lerna-package-bundle && bash -c "mv ./packages/*/dist/* dist/" && ls dist
6363
dist-directory: /dist
6464
env:
6565
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

examples/cdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"watch": "tsc -w",
1616
"test": "npm run test:unit",
1717
"package": "echo 'Not applicable'",
18-
"package-uber-zip": "echo 'Not applicable'",
18+
"package-bundle": "echo 'Not applicable'",
1919
"test:unit": "npm run build && jest",
2020
"test:e2e": "echo 'To be implemented ...'",
2121
"version": "npm install @aws-lambda-powertools/[email protected] @aws-lambda-powertools/[email protected] @aws-lambda-powertools/[email protected] && git add package.json",

examples/sam/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build": "sam build --beta-features",
1212
"test": "npm run test:unit",
1313
"package": "echo 'Not applicable'",
14-
"package-uber-zip": "echo 'Not applicable'",
14+
"package-bundle": "echo 'Not applicable'",
1515
"test:unit": "npm run build && jest",
1616
"test:e2e": "echo 'To be implemented ...'",
1717
"version": "npm install @aws-lambda-powertools/[email protected] @aws-lambda-powertools/[email protected] @aws-lambda-powertools/[email protected] && git add package.json"

uber-package-builder.sh renamed to package-bundler.sh

+11-13
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,26 @@
22
set -e
33

44

5-
# usage() {
6-
# echo "Uber package Builder"
7-
# echo "------------------------"
8-
# echo "./uber-pacakge-builder.sh NAME LOCAL_NPM_PACKAGE_LOCATION"
9-
# echo ""}
5+
usage() {
6+
echo "Uber package Builder"
7+
echo "------------------------"
8+
echo "./package-bundler.sh NAME LOCAL_NPM_PACKAGE_LOCATION"
9+
echo ""
10+
}
1011

1112

12-
# if [[ "$#" -lt 2 ]]; then
13-
# usage
14-
# exit 1
15-
# fi
13+
if [[ "$#" -lt 2 ]]; then
14+
usage
15+
exit 1
16+
fi
1617

1718
name=$(basename ${1})
1819
dist_folder="${2}"
1920

20-
echo "Will bundle $(ls ${dist_folder}) into ${dist_folder}/${name}.tgz from ${PWD}"
21+
echo "Will bundle $(ls ${dist_folder}) into ${dist_folder}/${name}.tgz"
2122

2223
output_folder="$(mktemp -d)"
2324

24-
echo "$output_folder is the output folder"
25-
2625
docker_image="public.ecr.aws/sam/build-nodejs14.x:latest"
2726
volume_params="-v $output_folder:/bundle"
2827

@@ -34,7 +33,6 @@ cp -r "${2}" "$output_folder/$package_folder/"
3433
install_command="pushd $package_folder; npm install --save ./*.tgz; popd"
3534
volume_params="$volume_params -v $HOME/.npmrc:/root/.npmrc"
3635

37-
# echo "Building bundle: docker run --rm $volume_params -w "/bundle" "$docker_image" /bin/bash -c "$install_command && $zip_command""
3836
zip_command="zip -r bundle.zip * && rm -rf $package_folder"
3937

4038
docker run --rm $volume_params -w "/bundle" "$docker_image" /bin/bash -c "$install_command && $zip_command"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"lerna-test:unit": "lerna exec -- npm run test:unit",
2020
"lerna-test:e2e": "lerna exec -- npm run test:e2e",
2121
"lerna-package": "lerna exec -- npm run package",
22-
"lerna-package-uber-zip": "lerna exec -- npm run package-uber-zip",
22+
"lerna-package-bundle": "lerna exec -- npm run package-bundle",
2323
"lerna-build": "lerna exec -- tsc",
2424
"lerna-lint": "lerna exec -- eslint \"./{src,tests}/**/*.ts ./src/*.ts\"",
2525
"lerna-format": "lerna exec -- eslint --fix \"./{src,tests}/**/*.ts ./src/*.ts\"",

packages/commons/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"lint": "eslint --ext .ts --fix --no-error-on-unmatched-pattern src tests",
2020
"format": "eslint --fix --ext .ts --fix --no-error-on-unmatched-pattern src tests",
2121
"package": "mkdir -p dist/ && npm pack && mv *.tgz dist/",
22-
"package-uber-zip": "../../uber-package-builder.sh ${LERNA_PACKAGE_NAME}-uber ./dist/",
22+
"package-bundle": "../../package-bundler.sh ${LERNA_PACKAGE_NAME}-bundle ./dist/",
2323
"prepare": "npm run build",
2424
"prepublishOnly": "npm test && npm run lint",
2525
"preversion": "npm run lint",

packages/logger/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"lint": "eslint --ext .ts --fix --no-error-on-unmatched-pattern src tests",
2222
"format": "eslint --fix --ext .ts --fix --no-error-on-unmatched-pattern src tests",
2323
"package": "mkdir -p dist/ && npm pack && mv *.tgz dist/",
24-
"package-uber-zip": "../../uber-package-builder.sh ${LERNA_PACKAGE_NAME}-uber ./dist/",
24+
"package-bundle": "../../package-bundler.sh ${LERNA_PACKAGE_NAME}-bundle ./dist/",
2525
"prepare": "npm run build",
2626
"prepublishOnly": "npm test && npm run lint",
2727
"preversion": "npm run lint",

packages/metrics/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"lint": "eslint --ext .ts --fix --no-error-on-unmatched-pattern src tests",
2222
"format": "eslint --fix --ext .ts --fix --no-error-on-unmatched-pattern src tests",
2323
"package": "mkdir -p dist/ && npm pack && mv *.tgz dist/",
24-
"package-uber-zip": "../../uber-package-builder.sh ${LERNA_PACKAGE_NAME}-uber ./dist/",
24+
"package-bundle": "../../package-bundler.sh ${LERNA_PACKAGE_NAME}-bundle ./dist/",
2525
"prepare": "npm run build",
2626
"prepublishOnly": "npm test && npm run lint",
2727
"preversion": "npm run lint",

packages/tracer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"version": "npm run format && git add -A src",
2727
"postversion": "git push && git push --tags",
2828
"package": "mkdir -p dist/ && npm pack && mv *.tgz dist/",
29-
"package-uber-zip": "../../uber-package-builder.sh ${LERNA_PACKAGE_NAME}-uber ./dist/"
29+
"package-bundle": "../../package-bundler.sh ${LERNA_PACKAGE_NAME}-bundle ./dist/"
3030
},
3131
"homepage": "https://github.com/awslabs/aws-lambda-powertools-typescript/tree/master/packages/tracer#readme",
3232
"license": "MIT-0",

0 commit comments

Comments
 (0)