-
Notifications
You must be signed in to change notification settings - Fork 154
chore: updated dependencies #569
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you double check if we can still run npm run test
on packages/logger
with npm 8?
Those who are from npm6 (like me) will cd to the packages/logger
run npm install
and npm run test
.
if it doesn't work, we need additional update on CONTRIBUTIONG.md
reco.mp4The video above shows a fresh clone (so no existing
If I instead I had ran Screen.Recording.2022-02-23.at.13.06.47.mp4 |
e557221
to
a8e9692
Compare
@ijemmy @saragerion after merging both checks are passing & vulnerabilities are gone |
Description of your changes
This PR aims at closing some of the Dependabot PRs that have been open for a while as well as removing vulnerable packages (
vm2
, a dev dependency ofaws-cdk
and hence never shipped on npm).In doing so, since we enforced
[email protected]
, I have realised that thepackage-lock.json
files in the utilities packages are not used anymore and so can safely be removed. This is because we are using the workspaces feature of npm that allows to manage dependencies centrally.The workspaces feature also allows us to run commands in one or more packages like
npm run test -w packages/logger
which is something we should look at in a separate effort to potentially & partially start moving away fromlerna
.Actions:
packages/logger
with:packages/tracing
with:packages/metrics
with:packages/commons
with:As result, running

npm audit
returns 0 vulnerabilities:Likewise, running

npm run lerna-test
after the changes shows all tests passing:Finally, running e2e tests on the new branch also works (locally), see below:
lerna notice cli v4.0.0
lerna info Executing command in 5 packages: "npm run test:e2e"
To be implemented ...
Not Applicable
[test:e2e:nodejs14x]
[test:e2e:nodejs14x] > @aws-lambda-powertools/[email protected] test:e2e:nodejs14x
[test:e2e:nodejs14x] > RUNTIME=nodejs14x jest --group=e2e/logger
[test:e2e:nodejs14x]
[test:e2e:nodejs12x]
[test:e2e:nodejs12x] > @aws-lambda-powertools/[email protected] test:e2e:nodejs12x
[test:e2e:nodejs12x] > RUNTIME=nodejs12x jest --group=e2e/logger
[test:e2e:nodejs12x]
Test Suites: 0 of 4 total
Tests: 0 total
Snapshots: 0 total
Time: 0 s, estimated 160 s
Bundling asset MetricsE2EDecoratorStack/MyFunction/Code/Stage...
Bundling asset MetricsE2EStandardFunctionsStack/MyFunction/Code/Stage...
RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
...02d2979647400d1d829aa85693b24274bd1b4e40d4f40aea55657ab5/index.js 17.8kb
⚡ Done in 18ms
RUNS tests/e2e/standardFunctions.test.ts⚠️
RUNS tests/e2e/decorator.test.ts
...b8b2d518b5f308eeb1354dd432abf8cc2ffcf3feba0be9fb2224c7d/index.js 1.8mb
⚡ Done in 184ms
Bundling asset TracerIntegTest/Middleware/Code/Stage...
...e3695950011fe620902ba7d16a3b501ea04090e757b83c74da5d7da3/index.js 17.3kb
⚡ Done in 16ms
RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
Test Suites: 0 of 6 total⚠️
Tests: 0 total
Snapshots: 0 total
Time: 21 s[test:e2e:nodejs14x] Bundling asset Logger-E2E-nodejs14x-SampleRate-Decorator-1e861339-d0e6-4216-80c/testFunction/Code/Stage...
[test:e2e:nodejs12x]
[test:e2e:nodejs12x] ...1eb88ecdd81c7c5290dd4a533a7d89bbe68b8b7d7e6fb82c9ee68e3c/index.js 93.6kb
[test:e2e:nodejs12x]
[test:e2e:nodejs12x] ⚡ Done in 19ms
RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
...c2177f12ef8745c7b2870567b947cf09671fc2d8cab4e7d7dc61309/index.js 1.8mb
⚡ Done in 142ms
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
Test Suites: 0 of 6 total
Tests: 0 total
Bundling asset TracerIntegTest/Decorator/Code/Stage...
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
Test Suites: 0 of 6 total
RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
Test Suites: 0 of 6 total
Tests: 0 total
Snapshots: 0 total
Time: 23 s[test:e2e:nodejs14x]
[test:e2e:nodejs14x] ...762238f1e4a05dbc5df5fbe9d52f57e4cbe5b1d8936865dddf667f[0%] start: Publishing 4c1c04a3df18becc1484b372251c432c478811fd022f8f74162639657b70d16e:current
[0%] start: Publishing 077a9f41d59d02e71b6011b5a0ea82993e2c5b41e0bcb6168610e0b98bfa5025:current
RUNS tests/e2e/standardFunctions.test.ts⚠️
RUNS tests/e2e/decorator.test.ts
...658a361d20bb6121626191f0aeb613dbce656575ac66d2265ad43e1/index.js 1.8mb
[100%] success: Published 4c1c04a3df18becc1484b372251c432c478811fd022f8f74162639657b70d16e:current
MetricsE2EStandardFunctionsStack: creating CloudFormation changeset...
[100%] success: Published 077a9f41d59d02e71b6011b5a0ea82993e2c5b41e0bcb6168610e0b98bfa5025:current
MetricsE2EDecoratorStack: creating CloudFormation changeset...
RUNS tests/e2e/standardFunctions.test.ts⚠️
RUNS tests/e2e/decorator.test.ts
RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
...e3543f31042cb8d110466103c9b96ab51ccc62931671931abe9bfb5/index.js 1.8mb
⚡ Done in 144ms
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
Test Suites: 0 of 6 total
Tests: 0 total
Snapshots: 0 total
Time: 25 s[test:e2e:nodejs12x] [50%] success: Published 33cfb47dad821cf2ab62cd48b1d3c58435b00bf5a2c99d369f2401e3e5a36391:current
[test:e2e:nodejs12x] [50%] start: Publishing c13434f8f1aa2ea30fa577b2feb208a41368b11787b752e10bfc71fe8eb919d5:current
[test:e2e:nodejs14x] [0%] start: Publishing 2d5395d25b07090c9d97ddfbfbe76b70f16c5c80b70c5d81ac3cd0f8748d6c28:current
[test:e2e:nodejs14x] [0%] start: Publishing db9faa5062d88b8f2eb4881236188bb03aa1 RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
Test Suites: 0 of 6 total
Tests: 0 total
Snapshots: 0 total
Time: 26 s[test:e2e:nodejs14x] [50%] success: Published 2d5395d25b07090c9d97ddfbfbe76b70f16c5c80b70c5d81ac3cd0f8748d6c28:current
[test:e2e:nodejs14x] [50%] start: Publishing c13434f8f1aa2ea30fa577b2feb208a41368b11787b752e10bfc71fe8eb919d5:current
[test:e2e:nodejs14x] [50%] success: Published db9faa5062d88b8f2eb4881236188bb03aa1241123c23d2bab95d75b32ea86b4:current
[test:e2e:nodejs14x] [50%] start: Publishing c13434f8f1aa2ea30fa577b2feb208a41368b11787b752e10bfc71fe8eb919d5:current
[test:e2e:nodejs14x] [0%] start: Publishing 33cfb47dad821cf2ab62cd48b1d3c58435b00bf5a2c99d369f2401e3e5a36391:current
[test:e2e:nodejs14x] [100%] success: Published c13434f8f1aa2ea30fa577b2feb208a41368b11787b752e10bfc71fe8eb919d5:current
[test:e2e:nodejs14x] Logger-E2E-nodejs14x-BasicFeatures-Middy-1dd405db-6374-441f-974d: creating CloudFormation changeset...
[test:e2e:nodejs14x] [100%] success: Published c13434f8f1aa2ea30fa577b2feb208a41368b11787b752e10bfc71fe8eb919d5:current
[test:e2e:nodejs14x] Logger-E2E-nodejs14x-ChildLogger-Manual-cd80dc3a-c355-4d4c-8985-: creating CloudFormation changeset...
[test:e2e:nodejs12x] [50%] success: Published 2d5395d25b07090c9d97ddfbfbe76b70f16c5c80b70c5d81ac3cd0f8748d6c28:current
[test:e2e:nodejs12x] [50%] start: Publishing c13434f8f1aa2ea30fa577b2feb208a41368b11787b752e10bfc71fe8eb919d5:current
[test:e2e:nodejs12x] [0%] start: Publishing db9faa5062d88b8f2eb4881236188bb03aa1241123c23d2bab95d75b32ea86b4:current
[test:e2e:nodejs12x] [100%] success: Published c13434f8f1aa2ea30fa577b2feb208a41 RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
Test Suites: 0 of 6 total
Tests: 0 total
Snapshots: 0 total
Time: 27 s[test:e2e:nodejs12x] [50%] success: Published db9faa5062d88b8f2eb4881236188bb03aa1241123c23d2bab95d75b32ea86b4:current
[test:e2e:nodejs12x] [50%] start: Publishing c13434f8f1aa2ea30fa577b2feb208a41368b11787b752e10bfc71fe8eb919d5:current
[test:e2e:nodejs14x] [100%] success: Published c13434f8f1aa2ea30fa577b2feb208a41368b11787b752e10bfc71fe8eb919d5:current
[0%] start: Publishing a52ae43a290c55695509cfa1b832e09e86c97581a99357fb9b8eb46ef RUNS tests/e2e/standardFunctions.test.ts
[25%] success: Published a52ae43a290c55695509cfa1b832e09e86c97581a99357fb9b8eb46efccab5df:current
[25%] start: Publishing ec7c696a7df0924ad81d198f825ec9c046352b29edaea5a0a9b8d229b6c62260:current
[50%] success: Published ec7c696a7df0924ad81d198f825ec9c046352b29edaea5a0a9b8d229b6c62260:current
[50%] start: Publishing 5eb8596e7d02cced6ce5c01938b468e52015af4b7ad3dc2dea02b35d9188ad43:current
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
Test Suites: 0 of 6 total
Tests: 0 total
Snapshots: 0 total
Time: 105 s
RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
Test Suites: 0 of 4 total
Tests: 4 passed, 4 total
Snapshots: 0 total
Time: 113 s, estimated 160 s
████████████████████████████████████████[test:e2e:nodejs14x] PASS AWS Lambda Powertools utility: LOGGER tests/e2e/childLogger.manual.test.ts (112.266 s)
[test:e2e:nodejs14x] ● Console
[test:e2e:nodejs14x]
[test:e2e:nodejs14x] console.log
[test:e2e:nodejs14x] logGroupName /aws/lambda/Logger-E2E-nodejs14x-ChildLogger-Manual-cd80dc3a-c355-4d4c-8985-
[test:e2e:nodejs14x]
[test:e2e:nodejs14x] at tests/e2e/childLogger.manual.test.ts:77:13
[test:e2e:nodejs14x]
[test:e2e:nodejs14x] PASS AWS Lambda Powertools utility: LOGGER tests/e2e/basicFeatures.middy.test.ts (112.454 s)
[test:e2e:nodejs14x] ● Console
RUNS tests/e2e/standardFunctions.test.ts
RUNS tests/e2e/decorator.test.ts
Test Suites: 0 of 4 total
Tests: 4 passed, 4 total
Snapshots: 0 total
Time: 114 s, estimated 160 s
████████████████████████████████████████[test:e2e:nodejs12x] PASS AWS Lambda Powertools utility: LOGGER tests/e2e/basicFeatures.middy.test.ts (112.839 s)
[test:e2e:nodejs12x] ● Console
[test:e2e:nodejs12x]
[test:e2e:nodejs12x] console.log
[test:e2e:nodejs12x] logGroupName /aws/lambda/Logger-E2E-nodejs12x-BasicFeatures-Middy-f9bf544e-97f9-4fb5-a2fc
[test:e2e:nodejs12x]
[test:e2e:nodejs12x] at tests/e2e/basicFeatures.middy.test.ts:77:13
[test:e2e:nodejs12x]
[test:e2e:nodejs14x] PASS AWS Lambda Powertools utility: LOGGER tests/e2e/sampleRate.decorator.test.ts (113.299 s)
[test:e2e:nodejs14x] ● Console
[test:e2e:nodejs14x]
[test:e2e:nodejs14x] console.log
[test:e2e:nodejs14x] logGroupName /aws/lambda/Logger-E2E-nodejs14x-SampleRate-Decorator-1e861339-d0e6-4216-80c
[test:e2e:nodejs14x]
[test:e2e:nodejs14x] at tests/e2e/sampleRate.decorator.test.ts:70:13
[test:e2e:nodejs14x]
[test:e2e:nodejs14x]
[test:e2e:nodejs14x] Test Suites: 3 passed, 3 of 8 total
[test:e2e:nodejs14x] Tests: 13 passed, 13 total
[test:e2e:nodejs14x] Snapshots: 0 total
[test:e2e:nodejs14x] Time: 114.283 s
[test:e2e:nodejs14x] Ran all test suites.
[test:e2e:nodejs14x] npm run test:e2e:nodejs14x exited with code 0
[test:e2e:nodejs12x] PASS AWS Lambda Powertools utility: LOGGER tests/e2e/childLogger.manual.test.ts (113.394 s)
PASS tests/e2e/standardFunctions.test.ts (116.314 s)
● Console
PASS tests/e2e/decorator.test.ts (121.791 s)
● Console
RUNS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts
Test Suites: 0 of 6 total
Tests: 0 total
Snapshots: 0 total
Time: 129 s[test:e2e:nodejs12x] PASS AWS Lambda Powertools utility: LOGGER tests/e2e/sampleRate.decorator.test.ts (127.432 s)
[test:e2e:nodejs12x] ● Console
[test:e2e:nodejs12x]
[test:e2e:nodejs12x] console.log
[test:e2e:nodejs12x] logGroupName /aws/lambda/Logger-E2E-nodejs12x-SampleRate-Decorator-31c20176-62af-485e-a80
[test:e2e:nodejs12x]
[test:e2e:nodejs12x] at tests/e2e/sampleRate.decorator.test.ts:70:13
[test:e2e:nodejs12x]
[test:e2e:nodejs12x]
PASS AWS Lambda Powertools utility: TRACER tests/e2e/tracer.test.ts (343.597 s)
● Console
Test Suites: 1 passed, 1 of 6 total
Tests: 8 passed, 8 total
Snapshots: 0 total
Time: 344.268 s
Ran all test suites.
lerna success exec Executed command in 5 packages: "npm run test:e2e"
How to verify this change
Before being able to verify this change on GitHub Actions, we need to update the workflows so that they use
[email protected]
instead of the default[email protected]
that comes with[email protected]
. A PR is coming.TBD
Related issues, RFCs
#568
#567
#554
#541
#475
PR status
Is this ready for review?: NO
Is it a breaking change?: NO
Checklist
Breaking change checklist
N/A
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.