-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollback to the old npm buildpack for Functions (#706)
* Roll back to the old npm buildpack for Functions This adds back the previous behavior for the functions npm process which allows for building an application without a `package-lock.json`.
- Loading branch information
1 parent
8f6336c
commit de057af
Showing
10 changed files
with
75 additions
and
10 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
buildpacks/nodejs-function-invoker/tests/fixtures/function-with-no-lockfile/.eslintrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"parserOptions": { | ||
"ecmaVersion": 2017 | ||
}, | ||
"env": { | ||
"es6": true | ||
}, | ||
"rules": { | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
buildpacks/nodejs-function-invoker/tests/fixtures/function-with-no-lockfile/.mocharc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"test": "./**/*.test.js", | ||
"recursive": true | ||
} |
4 changes: 4 additions & 0 deletions
4
buildpacks/nodejs-function-invoker/tests/fixtures/function-with-no-lockfile/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = async function (event, context, logger) { | ||
logger.info("logging info is a fun 1") | ||
return "Hello World".toLowerCase(); | ||
} |
24 changes: 24 additions & 0 deletions
24
buildpacks/nodejs-function-invoker/tests/fixtures/function-with-no-lockfile/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "myfn-function", | ||
"version": "0.0.1", | ||
"author": "TODO", | ||
"description": "TODO", | ||
"license": "UNLICENSED", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git" | ||
}, | ||
"engines": { | ||
"node": "^14.0" | ||
}, | ||
"scripts": { | ||
"lint": "eslint . --ext .js --config .eslintrc", | ||
"test": "mocha" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.3.4", | ||
"eslint": "^6.8.0", | ||
"mocha": "^8.4.0", | ||
"sinon": "^10.0.0" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
buildpacks/nodejs-function-invoker/tests/fixtures/function-with-no-lockfile/project.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[_] | ||
schema-version = "0.2" | ||
|
||
[com.salesforce] | ||
schema-version = "0.1" | ||
id = "myfn" | ||
description = "A Function" | ||
type = "function" | ||
salesforce-api-version = "53.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters