File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## Unreleased
4
+
5
+ - [ utils] fix: Remove node types
6
+
3
7
## 5.0.7
4
8
5
9
- [ utils] ref: Move ` htmlTreeAsString ` to ` @sentry/browser `
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ interface SentryGlobal {
14
14
*
15
15
* @param request The module path to resolve
16
16
*/
17
- export function dynamicRequire ( mod : NodeModule , request : string ) : any {
17
+ export function dynamicRequire ( mod : any , request : string ) : any {
18
+ // tslint:disable-next-line: no-unsafe-any
18
19
return mod . require ( request ) ;
19
20
}
20
21
Original file line number Diff line number Diff line change
1
+ import * as fs from 'fs' ;
2
+ import * as path from 'path' ;
3
+
4
+ const testStrings = [ `/// <reference types="node" />` ] ;
5
+
6
+ describe ( 'build' , ( ) => {
7
+ test ( 'not contains types' , ( ) => {
8
+ const paths = [ path . join ( './dist' ) , path . join ( './esm' ) ] ;
9
+ paths . forEach ( dir => {
10
+ if ( ! fs . existsSync ( dir ) ) {
11
+ expect ( dir ) . toBe ( `${ dir } doesn't exist please build first` ) ;
12
+ }
13
+ const files = fs . readdirSync ( dir ) ;
14
+ files . forEach ( file => {
15
+ if ( file . includes ( '.d.ts' ) ) {
16
+ testStrings . forEach ( testString => {
17
+ expect ( fs . readFileSync ( path . join ( dir , file ) , 'utf8' ) ) . toEqual ( expect . not . stringContaining ( testString ) ) ;
18
+ } ) ;
19
+ }
20
+ } ) ;
21
+ } ) ;
22
+ } ) ;
23
+ } ) ;
You can’t perform that action at this time.
0 commit comments