File tree Expand file tree Collapse file tree 3 files changed +30
-13
lines changed Expand file tree Collapse file tree 3 files changed +30
-13
lines changed Original file line number Diff line number Diff line change 11- Fixes issue when installing a Firebase Extension where secrets would be created before validation.
22- Fixes issue with filtering on a specific storage bucket using functions in the emulator. (#3893 )
33- Fixes check in Cloud Functions for Firebase initialization to check for API enablement before trying to enable them. (#2574 )
4- - No longer tries to clean up function build images from Artifact Registry when Artifact Registry is not enabled (#3943 )
5- - Show error message when running ` firebase init hosting:github ` with no Hosting config in ` firebase.json ` (#3113 )
4+ - No longer tries to clean up function build images from Artifact Registry when Artifact Registry is not enabled. (#3943 )
5+ - Show error message when running ` firebase init hosting:github ` with no Hosting config in ` firebase.json ` . (#3113 )
66- Fixes issue where ` remoteconfig:get ` was not fetching the latest version by default. (#3559 )
7+ - Fixes issue where empty variables in .env files would instead read as multi-line values. (#3934 )
Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ const LINE_RE = new RegExp(
4545 "^" + // begin line
4646 "\\s*" + // leading whitespaces
4747 "(\\w+)" + // key
48- "\\s*=\\s *" + // separator (=)
48+ "\\s*=[\\f\\t\\v] *" + // separator (=)
4949 "(" + // begin optional value
5050 "\\s*'(?:\\\\'|[^'])*'|" + // single quoted or
5151 '\\s*"(?:\\\\"|[^"])*"|' + // double quoted or
52- "[^#\\r\\n]+ " + // unquoted
52+ "[^#\\r\\n]* " + // unquoted
5353 ")?" + // end optional value
5454 "\\s*" + // trailing whitespaces
5555 "(?:#[^\\n]*)?" + // optional comment
@@ -109,6 +109,7 @@ export function parse(data: string): ParseResult {
109109 v = v . replace ( / \\ ( [ \\ ' " ] ) / g, "$1" ) ;
110110 }
111111 }
112+
112113 envs [ k ] = v ;
113114 }
114115
Original file line number Diff line number Diff line change @@ -135,24 +135,39 @@ BAR=bar
135135 want : { FOO : "foo" } ,
136136 } ,
137137 {
138- description : "should ignore comments " ,
138+ description : "should handle empty values " ,
139139 input : `
140- FOO=foo # comment
141- # line comment 1
142- # line comment 2
143- BAR=bar # another comment
140+ FOO=
141+ BAR= "blah"
144142` ,
143+ want : { FOO : "" , BAR : "blah" } ,
144+ } ,
145+ {
146+ description : "should handle quoted values after a newline" ,
147+ input : `
148+ FOO=
149+ "blah"
150+ ` ,
151+ want : { FOO : "blah" } ,
152+ } ,
153+ {
154+ description : "should ignore comments" ,
155+ input : `
156+ FOO=foo # comment
157+ # line comment 1
158+ # line comment 2
159+ BAR=bar # another comment
160+ ` ,
145161 want : { FOO : "foo" , BAR : "bar" } ,
146162 } ,
147163 {
148164 description : "should ignore empty lines" ,
149165 input : `
150- FOO=foo
166+ FOO=foo
151167
168+ BAR=bar
152169
153- BAR=bar
154-
155- ` ,
170+ ` ,
156171 want : { FOO : "foo" , BAR : "bar" } ,
157172 } ,
158173 ] ;
You can’t perform that action at this time.
0 commit comments