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

deps(node,typescript): update dependencies #1468

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

lance
Copy link
Member

@lance lance commented Dec 13, 2022

Updates dependencies in Node.js and TypeScript functions to eliminate some security warnings and bump to faas-js-runtime 0.9.7, which allows for ESM modules now.

Signed-off-by: Lance Ball lball@redhat.com

/kind chore

Node.js and TypeScript functions now support ESM modules

@lance lance added this to the 1.9.0 Release milestone Dec 13, 2022
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 13, 2022
@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

Base: 63.15% // Head: 63.41% // Increases project coverage by +0.25% 🎉

Coverage data is based on head (ec8dcbd) compared to base (972b311).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1468      +/-   ##
==========================================
+ Coverage   63.15%   63.41%   +0.25%     
==========================================
  Files          74       75       +1     
  Lines       10806    10808       +2     
==========================================
+ Hits         6825     6854      +29     
+ Misses       3423     3398      -25     
+ Partials      558      556       -2     
Flag Coverage Δ
integration-tests 53.33% <ø> (-0.06%) ⬇️
unit-tests ?
unit-tests-macos-latest 53.39% <ø> (?)
unit-tests-ubuntu-latest 54.79% <ø> (?)
unit-tests-windows-latest 53.44% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
knative/logs.go 80.41% <0.00%> (-5.16%) ⬇️
knative/deployer.go 61.31% <0.00%> (-0.17%) ⬇️
docker/docker_client_nonlinux.go 0.00% <0.00%> (ø)
client.go 62.57% <0.00%> (+0.61%) ⬆️
docker/creds/credentials.go 73.06% <0.00%> (+1.34%) ⬆️
docker/docker_client.go 84.87% <0.00%> (+23.52%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lance
Copy link
Member Author

lance commented Dec 14, 2022

I don't know why the on-cluster tests are failing...

@matejvasek
Copy link
Contributor

@lance some were probably flakes,
but typescript image start really fails:

docker run -it --rm -p8080:8080 quay.io/mvasek/fn-ts:latest
Environment: 
	DEV_MODE=false
	NODE_ENV=production
	DEBUG_PORT=5858
Launching via npm...
npm info using npm@8.15.0
npm info using node@v16.17.1
npm timing npm:load:whichnode Completed in 0ms
npm timing config:load:defaults Completed in 2ms
npm timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 1ms
npm timing config:load:builtin Completed in 1ms
npm timing config:load:cli Completed in 2ms
npm timing config:load:env Completed in 0ms
npm timing config:load:project Completed in 4ms
npm timing config:load:file:/opt/app-root/src/.npmrc Completed in 0ms
npm timing config:load:user Completed in 0ms
npm timing config:load:file:/opt/app-root/src/.npm-global/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 0ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:credentials Completed in 3ms
npm timing config:load:setEnvs Completed in 0ms
npm timing config:load Completed in 14ms
npm timing npm:load:configload Completed in 14ms
npm timing npm:load:mkdirpcache Completed in 4ms
npm timing npm:load:mkdirplogs Completed in 1ms
npm timing npm:load:setTitle Completed in 1ms
npm timing config:load:flatten Completed in 2ms
npm timing npm:load:display Completed in 8ms
npm timing npm:load:logFile Completed in 4ms
npm timing npm:load:timers Completed in 0ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load Completed in 33ms

> event-handler@0.1.0 start
> FUNC_LOG_LEVEL=info faas-js-runtime ./build/index.js

⛔ Error: Cannot find module '/opt/app-root/src/build/package.json'
Require stack:
- /opt/app-root/src/node_modules/faas-js-runtime/lib/function-loader.js
- /opt/app-root/src/node_modules/faas-js-runtime/bin/cli.js
npm timing command:run Completed in 361ms
npm timing npm Completed in 402ms
npm info ok 

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 2022
@matejvasek
Copy link
Contributor

matejvasek commented Dec 15, 2022

npm run start

> event-handler@0.1.0 start
> FUNC_LOG_LEVEL=info faas-js-runtime ./build/index.js

⛔ Error: Cannot find module '/tmp/tmp.5IKfYnlUuG/fn-ts/build/package.json'
Require stack:
- /tmp/tmp.5IKfYnlUuG/fn-ts/node_modules/faas-js-runtime/lib/function-loader.js
- /tmp/tmp.5IKfYnlUuG/fn-ts/node_modules/faas-js-runtime/bin/cli.js

maybe build part is not run?
EDIT: nope, npm run build does not help.

@matejvasek
Copy link
Contributor

/cc @lholmquist

@knative-prow
Copy link

knative-prow bot commented Dec 15, 2022

@matejvasek: GitHub didn't allow me to request PR reviews from the following users: lholmquist.

Note that only knative members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @lholmquist

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@matejvasek
Copy link
Contributor

cc @lholmquist

@matejvasek
Copy link
Contributor

Does one need specific node version?

@lance
Copy link
Member Author

lance commented Dec 15, 2022

@matejvasek thanks for looking into this. The problem is the ESM module loader that landed in this nodeshift/faas-js-runtime#140. It assumes there is a package.json file in the function directory, which, in the case of TypeScript functions will not be the case (it all ends up in ./build). I'll open an issue on faas-js-runtime.

@lance
Copy link
Member Author

lance commented Dec 16, 2022

/hold for nodeshift/faas-js-runtime#144

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 16, 2022
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 6, 2023
@lance
Copy link
Member Author

lance commented Jan 8, 2023

/unhold
@matejvasek ptal
/cc @lkingland

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 8, 2023
@knative-prow knative-prow bot requested a review from lkingland January 8, 2023 17:17
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2023
Updates dependencies in Node.js and TypeScript functions to eliminate
some security warnings and bump to faas-js-runtime 0.9.7, which allows
for ESM modules now.

Signed-off-by: Lance Ball <lball@redhat.com>
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2023
Copy link
Member

@lkingland lkingland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2023
@knative-prow
Copy link

knative-prow bot commented Jan 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance, lkingland

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit 7b1e0c0 into knative:main Jan 16, 2023
lance added a commit to lance/func that referenced this pull request Feb 15, 2023
Updates dependencies in Node.js and TypeScript functions to eliminate
some security warnings and bump to faas-js-runtime 0.9.7, which allows
for ESM modules now.

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/chore lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants