Skip to content

Commit

Permalink
feat: add object.hasown shim
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed May 31, 2022
1 parent 5b8e4d3 commit ea0aebf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 35 deletions.
50 changes: 16 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@
"luxon": "^2.4.0",
"node-fetch": "^3.2.4",
"node-schedule": "^2.1.0",
"object.hasown": "^1.1.1",
"p-memoize": "^6.0.1",
"p-retry": "^5.1.1",
"semver": "^7.3.7",
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
// TODO remove with node.js v16.9+ support
import 'object.hasown/auto'

export { default } from './ServerlessOffline.js'
2 changes: 1 addition & 1 deletion src/lambda/handler-runner/docker-runner/DockerContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export default class DockerContainer {
}

if (
Object.prototype.hasOwnProperty.call(layer, 'CompatibleRuntimes') &&
Object.hasOwn(layer, 'CompatibleRuntimes') &&
!layer.CompatibleRuntimes.includes(this.#runtime)
) {
if (this.log) {
Expand Down

0 comments on commit ea0aebf

Please sign in to comment.