-
Notifications
You must be signed in to change notification settings - Fork 146
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
Maintenance: remove test
folder from packaged utilities
#443
Comments
Hmmm I thought I fixed that when we moved to commons ... I can take a look |
Can't reproduce : ➜ aws-lambda-powertools-typescript git:(main) git checkout -b fix/tracer/bundling
➜ aws-lambda-powertools-typescript git:(fix/tracer/bundling) ✗ cd packages/tracing/
➜ tracing git:(fix/tracer/bundling) npm pack
npm notice
npm notice 📦 @aws-lambda-powertools/tracer@0.2.0
npm notice === Tarball Contents ===
npm notice 4.4kB README.md
npm notice 598B lib/config/ConfigService.d.ts
npm notice 483B lib/config/ConfigService.d.ts.map
npm notice 992B lib/config/ConfigService.js
npm notice 297B lib/config/ConfigServiceInterface.d.ts
npm notice 359B lib/config/ConfigServiceInterface.d.ts.map
npm notice 323B lib/config/ConfigServiceInterface.js
npm notice 557B lib/config/EnvironmentVariablesService.d.ts
npm notice 545B lib/config/EnvironmentVariablesService.d.ts.map
npm notice 2.6kB lib/config/EnvironmentVariablesService.js
npm notice 157B lib/config/index.d.ts
npm notice 181B lib/config/index.d.ts.map
npm notice 1.0kB lib/config/index.js
npm notice 196B lib/helpers.d.ts
npm notice 266B lib/helpers.d.ts.map
npm notice 571B lib/helpers.js
npm notice 159B lib/index.d.ts
npm notice 190B lib/index.d.ts.map
npm notice 1.1kB lib/index.js
npm notice 1.1kB lib/middleware/middy.d.ts
npm notice 309B lib/middleware/middy.d.ts.map
npm notice 4.2kB lib/middleware/middy.js
npm notice 114B lib/provider/index.d.ts
npm notice 160B lib/provider/index.d.ts.map
npm notice 954B lib/provider/index.js
npm notice 911B lib/provider/ProviderService.d.ts
npm notice 990B lib/provider/ProviderService.d.ts.map
npm notice 2.9kB lib/provider/ProviderService.js
npm notice 860B lib/provider/ProviderServiceInterface.d.ts
npm notice 1.0kB lib/provider/ProviderServiceInterface.d.ts.map
npm notice 331B lib/provider/ProviderServiceInterface.js
npm notice 17.2kB lib/Tracer.d.ts
npm notice 2.2kB lib/Tracer.d.ts.map
npm notice 35.6kB lib/Tracer.js
npm notice 719B lib/TracerInterface.d.ts
npm notice 838B lib/TracerInterface.d.ts.map
npm notice 291B lib/TracerInterface.js
npm notice 61B lib/types/index.d.ts
npm notice 132B lib/types/index.d.ts.map
npm notice 863B lib/types/index.js
npm notice 1.2kB lib/types/Tracer.d.ts
npm notice 775B lib/types/Tracer.d.ts.map
npm notice 279B lib/types/Tracer.js
npm notice 2.2kB package.json
npm notice === Tarball Details ===
npm notice name: @aws-lambda-powertools/tracer
npm notice version: 0.2.0
npm notice filename: @aws-lambda-powertools/tracer-0.2.0.tgz
npm notice package size: 20.0 kB
npm notice unpacked size: 91.2 kB
npm notice shasum: 74ef2efc672dda4a1f1c1bd9acc2f6c1abefdf4a
npm notice integrity: sha512-Ip6m5he9qASow[...]zDUwSVQPVX4bA==
npm notice total files: 44
npm notice
aws-lambda-powertools-tracer-0.2.0.tgz |
Tried with the latest published version on npm and I can confirm that the ~/Codes
❯ mkdir power_test_test
~/Codes
❯ cd power_test_test
~/Codes/power_test_test
❯ npm init -y
Wrote to /Users/aamorosi/Codes/power_test_test/package.json:
{
"name": "power_test_test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
~/Codes/power_test_test
❯ npm i @aws-lambda-powertools/logger
~/Codes/power_test_test
❯ ls -la node_modules/@aws-lambda-powertools/logger
total 808
drwxr-xr-x 8 aamorosi staff 256 Jan 10 12:28 .
drwxr-xr-x 5 aamorosi staff 160 Jan 10 12:28 ..
-rw-r--r-- 1 aamorosi staff 931 Oct 26 1985 LICENSE
-rw-r--r-- 1 aamorosi staff 4389 Oct 26 1985 README.md
drwxr-xr-x 13 aamorosi staff 416 Jan 10 12:28 lib
drwxr-xr-x 350 aamorosi staff 11200 Jan 10 12:28 node_modules
-rw-r--r-- 1 aamorosi staff 397069 Oct 26 1985 npm-shrinkwrap.json
-rw-r--r-- 1 aamorosi staff 2968 Oct 26 1985 package.json
~/Codes/power_test_test
❯ ls -la node_modules/@aws-lambda-powertools/logger/lib
total 80
drwxr-xr-x 13 aamorosi staff 416 Jan 10 12:28 .
drwxr-xr-x 8 aamorosi staff 256 Jan 10 12:28 ..
-rw-r--r-- 1 aamorosi staff 2748 Oct 26 1985 Logger.d.ts
-rw-r--r-- 1 aamorosi staff 19974 Oct 26 1985 Logger.js
drwxr-xr-x 10 aamorosi staff 320 Jan 10 12:28 config
drwxr-xr-x 10 aamorosi staff 320 Jan 10 12:28 formatter
-rw-r--r-- 1 aamorosi staff 160 Oct 26 1985 helpers.d.ts
-rw-r--r-- 1 aamorosi staff 571 Oct 26 1985 helpers.js
-rw-r--r-- 1 aamorosi staff 83 Oct 26 1985 index.d.ts
-rw-r--r-- 1 aamorosi staff 980 Oct 26 1985 index.js
drwxr-xr-x 8 aamorosi staff 256 Jan 10 12:28 log
drwxr-xr-x 6 aamorosi staff 192 Jan 10 12:28 middleware
drwxr-xr-x 9 aamorosi staff 288 Jan 10 12:28 types Closing the issue for now. |
|
@dreamorosi thanks for confirming. Looking forward to testing the latest build |
test
folder from packaged utilitiestest
folder from packaged utilities
Bug description
This was reported by @michaelbrewer first on Slack, then in this comment.
At the moment when we package the utilities before publishing we are including potentially unnecessary files like the content of the
tests
folder, example forTracer
but that applies also to the other utils:~/Codes/aws-lambda-powertools-typescript/packages/tracing ❯ npm pack npm notice npm notice 📦 @aws-lambda-powertools/tracer@0.2.0 npm notice === Tarball Contents === npm notice 4.4kB README.md npm notice 598B lib/config/ConfigService.d.ts npm notice 483B lib/config/ConfigService.d.ts.map npm notice 992B lib/config/ConfigService.js npm notice 297B lib/config/ConfigServiceInterface.d.ts npm notice 359B lib/config/ConfigServiceInterface.d.ts.map npm notice 323B lib/config/ConfigServiceInterface.js npm notice 557B lib/config/EnvironmentVariablesService.d.ts npm notice 545B lib/config/EnvironmentVariablesService.d.ts.map npm notice 2.6kB lib/config/EnvironmentVariablesService.js npm notice 157B lib/config/index.d.ts npm notice 181B lib/config/index.d.ts.map npm notice 1.0kB lib/config/index.js npm notice 196B lib/helpers.d.ts npm notice 266B lib/helpers.d.ts.map npm notice 571B lib/helpers.js npm notice 159B lib/index.d.ts npm notice 190B lib/index.d.ts.map npm notice 1.1kB lib/index.js npm notice 1.1kB lib/middleware/middy.d.ts npm notice 309B lib/middleware/middy.d.ts.map npm notice 4.2kB lib/middleware/middy.js npm notice 56B lib/packages/tracing/examples/capture-clients.d.ts npm notice 138B lib/packages/tracing/examples/capture-clients.d.ts.map npm notice 3.0kB lib/packages/tracing/examples/capture-clients.js npm notice 79B lib/packages/tracing/examples/capture-lambda-handler-error-decorator.d.ts npm notice 184B lib/packages/tracing/examples/capture-lambda-handler-error-decorator.d.ts.map npm notice 2.7kB lib/packages/tracing/examples/capture-lambda-handler-error-decorator.js npm notice 82B lib/packages/tracing/examples/capture-lambda-handler-response-decorator.d.ts npm notice 190B lib/packages/tracing/examples/capture-lambda-handler-response-decorator.d.ts.map npm notice 2.9kB lib/packages/tracing/examples/capture-lambda-handler-response-decorator.js npm notice 52B lib/packages/tracing/examples/hello-world.d.ts npm notice 130B lib/packages/tracing/examples/hello-world.d.ts.map npm notice 2.3kB lib/packages/tracing/examples/hello-world.js npm notice 70B lib/packages/tracing/examples/utils/lambda/index.d.ts npm notice 158B lib/packages/tracing/examples/utils/lambda/index.d.ts.map npm notice 904B lib/packages/tracing/examples/utils/lambda/index.js npm notice 163B lib/packages/tracing/examples/utils/lambda/LambdaInterface.d.ts npm notice 275B lib/packages/tracing/examples/utils/lambda/LambdaInterface.d.ts.map npm notice 335B lib/packages/tracing/examples/utils/lambda/LambdaInterface.js npm notice 182B lib/packages/tracing/examples/utils/namespaces/hello-world.d.ts npm notice 289B lib/packages/tracing/examples/utils/namespaces/hello-world.d.ts.map npm notice 1.3kB lib/packages/tracing/examples/utils/namespaces/hello-world.js npm notice 598B lib/packages/tracing/src/config/ConfigService.d.ts npm notice 492B lib/packages/tracing/src/config/ConfigService.d.ts.map npm notice 1.0kB lib/packages/tracing/src/config/ConfigService.js npm notice 297B lib/packages/tracing/src/config/ConfigServiceInterface.d.ts npm notice 368B lib/packages/tracing/src/config/ConfigServiceInterface.d.ts.map npm notice 335B lib/packages/tracing/src/config/ConfigServiceInterface.js npm notice 557B lib/packages/tracing/src/config/EnvironmentVariablesService.d.ts npm notice 554B lib/packages/tracing/src/config/EnvironmentVariablesService.d.ts.map npm notice 2.6kB lib/packages/tracing/src/config/EnvironmentVariablesService.js npm notice 157B lib/packages/tracing/src/config/index.d.ts npm notice 190B lib/packages/tracing/src/config/index.d.ts.map npm notice 1.0kB lib/packages/tracing/src/config/index.js npm notice 197B lib/packages/tracing/src/helpers.d.ts npm notice 275B lib/packages/tracing/src/helpers.d.ts.map npm notice 583B lib/packages/tracing/src/helpers.js npm notice 123B lib/packages/tracing/src/index.d.ts npm notice 176B lib/packages/tracing/src/index.d.ts.map npm notice 997B lib/packages/tracing/src/index.js npm notice 215B lib/packages/tracing/src/middleware/middy.d.ts npm notice 285B lib/packages/tracing/src/middleware/middy.d.ts.map npm notice 2.4kB lib/packages/tracing/src/middleware/middy.js npm notice 114B lib/packages/tracing/src/provider/index.d.ts npm notice 169B lib/packages/tracing/src/provider/index.d.ts.map npm notice 966B lib/packages/tracing/src/provider/index.js npm notice 911B lib/packages/tracing/src/provider/ProviderService.d.ts npm notice 999B lib/packages/tracing/src/provider/ProviderService.d.ts.map npm notice 2.8kB lib/packages/tracing/src/provider/ProviderService.js npm notice 860B lib/packages/tracing/src/provider/ProviderServiceInterface.d.ts npm notice 1.0kB lib/packages/tracing/src/provider/ProviderServiceInterface.d.ts.map npm notice 343B lib/packages/tracing/src/provider/ProviderServiceInterface.js npm notice 1.6kB lib/packages/tracing/src/Tracer.d.ts npm notice 1.5kB lib/packages/tracing/src/Tracer.d.ts.map npm notice 18.3kB lib/packages/tracing/src/Tracer.js npm notice 720B lib/packages/tracing/src/TracerInterface.d.ts npm notice 847B lib/packages/tracing/src/TracerInterface.d.ts.map npm notice 303B lib/packages/tracing/src/TracerInterface.js npm notice 58B lib/packages/tracing/tests/helpers/populateEnvironmentVariables.d.ts npm notice 172B lib/packages/tracing/tests/helpers/populateEnvironmentVariables.d.ts.map npm notice 1.2kB lib/packages/tracing/tests/helpers/populateEnvironmentVariables.js npm notice 73B lib/packages/tracing/tests/unit/config/EnvironmentVariablesService.test.d.ts npm notice 187B lib/packages/tracing/tests/unit/config/EnvironmentVariablesService.test.d.ts.map npm notice 9.3kB lib/packages/tracing/tests/unit/config/EnvironmentVariablesService.test.js npm notice 53B lib/packages/tracing/tests/unit/helpers.test.d.ts npm notice 137B lib/packages/tracing/tests/unit/helpers.test.d.ts.map npm notice 16.8kB lib/packages/tracing/tests/unit/helpers.test.js npm notice 51B lib/packages/tracing/tests/unit/middy.test.d.ts npm notice 133B lib/packages/tracing/tests/unit/middy.test.d.ts.map npm notice 5.1kB lib/packages/tracing/tests/unit/middy.test.js npm notice 61B lib/packages/tracing/tests/unit/ProviderService.test.d.ts npm notice 153B lib/packages/tracing/tests/unit/ProviderService.test.d.ts.map npm notice 13.8kB lib/packages/tracing/tests/unit/ProviderService.test.js npm notice 52B lib/packages/tracing/tests/unit/Tracer.test.d.ts npm notice 135B lib/packages/tracing/tests/unit/Tracer.test.d.ts.map npm notice 60.3kB lib/packages/tracing/tests/unit/Tracer.test.js npm notice 61B lib/packages/tracing/types/index.d.ts npm notice 134B lib/packages/tracing/types/index.d.ts.map npm notice 867B lib/packages/tracing/types/index.js npm notice 699B lib/packages/tracing/types/Tracer.d.ts npm notice 700B lib/packages/tracing/types/Tracer.d.ts.map npm notice 283B lib/packages/tracing/types/Tracer.js npm notice 114B lib/provider/index.d.ts npm notice 160B lib/provider/index.d.ts.map npm notice 954B lib/provider/index.js npm notice 911B lib/provider/ProviderService.d.ts npm notice 990B lib/provider/ProviderService.d.ts.map npm notice 2.9kB lib/provider/ProviderService.js npm notice 860B lib/provider/ProviderServiceInterface.d.ts npm notice 1.0kB lib/provider/ProviderServiceInterface.d.ts.map npm notice 331B lib/provider/ProviderServiceInterface.js npm notice 598B lib/src/config/ConfigService.d.ts npm notice 486B lib/src/config/ConfigService.d.ts.map npm notice 996B lib/src/config/ConfigService.js npm notice 297B lib/src/config/ConfigServiceInterface.d.ts npm notice 362B lib/src/config/ConfigServiceInterface.d.ts.map npm notice 327B lib/src/config/ConfigServiceInterface.js npm notice 557B lib/src/config/EnvironmentVariablesService.d.ts npm notice 548B lib/src/config/EnvironmentVariablesService.d.ts.map npm notice 2.6kB lib/src/config/EnvironmentVariablesService.js npm notice 157B lib/src/config/index.d.ts npm notice 184B lib/src/config/index.d.ts.map npm notice 1.0kB lib/src/config/index.js npm notice 196B lib/src/helpers.d.ts npm notice 269B lib/src/helpers.d.ts.map npm notice 575B lib/src/helpers.js npm notice 159B lib/src/index.d.ts npm notice 193B lib/src/index.d.ts.map npm notice 1.1kB lib/src/index.js npm notice 1.1kB lib/src/middleware/middy.d.ts npm notice 312B lib/src/middleware/middy.d.ts.map npm notice 4.2kB lib/src/middleware/middy.js npm notice 114B lib/src/provider/index.d.ts npm notice 163B lib/src/provider/index.d.ts.map npm notice 958B lib/src/provider/index.js npm notice 911B lib/src/provider/ProviderService.d.ts npm notice 993B lib/src/provider/ProviderService.d.ts.map npm notice 2.9kB lib/src/provider/ProviderService.js npm notice 860B lib/src/provider/ProviderServiceInterface.d.ts npm notice 1.0kB lib/src/provider/ProviderServiceInterface.d.ts.map npm notice 335B lib/src/provider/ProviderServiceInterface.js npm notice 17.2kB lib/src/Tracer.d.ts npm notice 2.2kB lib/src/Tracer.d.ts.map npm notice 35.6kB lib/src/Tracer.js npm notice 719B lib/src/TracerInterface.d.ts npm notice 841B lib/src/TracerInterface.d.ts.map npm notice 295B lib/src/TracerInterface.js npm notice 61B lib/src/types/index.d.ts npm notice 135B lib/src/types/index.d.ts.map npm notice 867B lib/src/types/index.js npm notice 1.1kB lib/src/types/Tracer.d.ts npm notice 725B lib/src/types/Tracer.d.ts.map npm notice 283B lib/src/types/Tracer.js npm notice 63B lib/tests/e2e/standardFunctions.test.d.ts npm notice 150B lib/tests/e2e/standardFunctions.test.d.ts.map npm notice 10.3kB lib/tests/e2e/standardFunctions.test.js npm notice 246B lib/tests/e2e/standardFunctions.test.MyFunction.d.ts npm notice 326B lib/tests/e2e/standardFunctions.test.MyFunction.d.ts.map npm notice 3.9kB lib/tests/e2e/standardFunctions.test.MyFunction.js npm notice 45B lib/tests/e2e/test.d.ts npm notice 114B lib/tests/e2e/test.d.ts.map npm notice 1.6kB lib/tests/e2e/test.js npm notice 58B lib/tests/helpers/populateEnvironmentVariables.d.ts npm notice 166B lib/tests/helpers/populateEnvironmentVariables.d.ts.map npm notice 1.3kB lib/tests/helpers/populateEnvironmentVariables.js npm notice 131B lib/tests/resources/contexts/hello-world.d.ts npm notice 257B lib/tests/resources/contexts/hello-world.d.ts.map npm notice 1.6kB lib/tests/resources/contexts/hello-world.js npm notice 69B lib/tests/resources/events/custom/hello-world.json npm notice 73B lib/tests/unit/config/EnvironmentVariablesService.test.d.ts npm notice 181B lib/tests/unit/config/EnvironmentVariablesService.test.d.ts.map npm notice 9.3kB lib/tests/unit/config/EnvironmentVariablesService.test.js npm notice 53B lib/tests/unit/helpers.test.d.ts npm notice 131B lib/tests/unit/helpers.test.d.ts.map npm notice 16.1kB lib/tests/unit/helpers.test.js npm notice 51B lib/tests/unit/middy.test.d.ts npm notice 127B lib/tests/unit/middy.test.d.ts.map npm notice 26.9kB lib/tests/unit/middy.test.js npm notice 61B lib/tests/unit/ProviderService.test.d.ts npm notice 147B lib/tests/unit/ProviderService.test.d.ts.map npm notice 13.8kB lib/tests/unit/ProviderService.test.js npm notice 52B lib/tests/unit/Tracer.test.d.ts npm notice 129B lib/tests/unit/Tracer.test.d.ts.map npm notice 79.3kB lib/tests/unit/Tracer.test.js npm notice 17.2kB lib/Tracer.d.ts npm notice 2.2kB lib/Tracer.d.ts.map npm notice 35.6kB lib/Tracer.js npm notice 719B lib/TracerInterface.d.ts npm notice 838B lib/TracerInterface.d.ts.map npm notice 291B lib/TracerInterface.js npm notice 61B lib/types/index.d.ts npm notice 132B lib/types/index.d.ts.map npm notice 863B lib/types/index.js npm notice 1.2kB lib/types/Tracer.d.ts npm notice 775B lib/types/Tracer.d.ts.map npm notice 279B lib/types/Tracer.js npm notice 2.2kB package.json npm notice === Tarball Details === npm notice name: @aws-lambda-powertools/tracer npm notice version: 0.2.0 npm notice filename: @aws-lambda-powertools/tracer-0.2.0.tgz npm notice package size: 70.1 kB npm notice unpacked size: 513.2 kB npm notice shasum: 0f5758f7b4f377ea192dfb76dbe9b4e29fa5007f npm notice integrity: sha512-fhFsEmwzMgT2l[...]MB4bJH43dZi9w== npm notice total files: 198 npm notice aws-lambda-powertools-tracer-0.2.0.tgz
Expected Behavior
Packaged utility shouldn't have tests shipped.
Current Behavior
tests
folder is included in the packaged tarball.Possible Solution
Possibly modify bundling configs & apply it to all packages.
Steps to Reproduce
npm pack
in any of the utilitiespackages/tracer
, etc.Environment
Related issues, RFCs
#419
The text was updated successfully, but these errors were encountered: