Skip to content

Commit 7795425

Browse files
joehanyykamei
andauthored
Merging next into master (#6659)
* Use `checkout@v4` for Firebase Hosting Preview GitHub Workflow (#6441) When starting a project with `firebase init` with GitHub Workflow, YAML files were configured with `actions/checkout@v3` previously. Now, `actions/checkout@v4` has been released, the template should also be updated to specify the latest version. https://github.com/actions/checkout/releases/tag/v4.0.0 Co-authored-by: joehan <[email protected]> * Support export in env parser (#6630) * Support export in env parser * use a noncapture group --------- Co-authored-by: Yutaka Kamei <[email protected]>
1 parent 29f65d9 commit 7795425

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fixed an issue where including `export` in .env files caused parsing errors. (#6629)

src/functions/env.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const RESERVED_KEYS = [
4545
const LINE_RE = new RegExp(
4646
"^" + // begin line
4747
"\\s*" + // leading whitespaces
48+
"(?:export)?" + // Optional 'export' in a non-capture group
49+
"\\s*" + // more whitespaces
4850
"([\\w./]+)" + // key
4951
"\\s*=[\\f\\t\\v]*" + // separator (=)
5052
"(" + // begin optional value

src/init/features/hosting/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ let YML_FULL_PATH_MERGE: string;
3232
const YML_PULL_REQUEST_FILENAME = "firebase-hosting-pull-request.yml";
3333
const YML_MERGE_FILENAME = "firebase-hosting-merge.yml";
3434

35-
const CHECKOUT_GITHUB_ACTION_NAME = "actions/checkout@v3";
35+
const CHECKOUT_GITHUB_ACTION_NAME = "actions/checkout@v4";
3636
const HOSTING_GITHUB_ACTION_NAME = "FirebaseExtended/action-hosting-deploy@v0";
3737

3838
const SERVICE_ACCOUNT_MAX_KEY_NUMBER = 10;

src/test/functions/env.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ describe("functions/env", () => {
1515
input: "FOO=foo ",
1616
want: { FOO: "foo" },
1717
},
18+
{
19+
description: "should parse exported values",
20+
input: "export FOO=foo",
21+
want: { FOO: "foo" },
22+
},
1823
{
1924
description: "should parse values with trailing spaces (single quotes)",
2025
input: "FOO='foo' ",

0 commit comments

Comments
 (0)