File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @firebase/util ' : patch
3
+ ---
4
+
5
+ Remove unneeded types from public typings file.
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ /* eslint-disable @typescript-eslint/no-require-imports */
19
+
20
+ /**
21
+ * @fileoverview
22
+ * Strip indexeddb types from typings before publishing, to
23
+ * prevent errors for Node users.
24
+ */
25
+ const { readFileSync, writeFileSync } = require ( 'fs' ) ;
26
+
27
+ const typingsText = readFileSync ( './dist/index.d.ts' , 'utf-8' ) ;
28
+ const newText = typingsText . replace ( `export * from './src/indexeddb';` , '' ) ;
29
+ writeFileSync ( './dist/index-public.d.ts' , newText , { encoding : 'utf-8' } ) ;
Original file line number Diff line number Diff line change 32
32
"test:ci" : " node ../../scripts/run_tests_in_ci.js -s test:all" ,
33
33
"test:all" : " run-p test:browser test:node" ,
34
34
"test:browser" : " karma start --single-run" ,
35
- "test:node" : " TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\" module\" :\" commonjs\" }' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js"
35
+ "test:node" : " TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\" module\" :\" commonjs\" }' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js" ,
36
+ "typings:public" : " ts-node generate-public-dts.ts && node ../../scripts/build/use_typings.js ./dist/index-public.d.ts"
36
37
},
37
38
"license" : " Apache-2.0" ,
38
39
"dependencies" : {
You can’t perform that action at this time.
0 commit comments