File tree Expand file tree Collapse file tree 7 files changed +18
-12
lines changed
Expand file tree Collapse file tree 7 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 1- const supportsAsyncAwait =
2- parseInt ( process . version . slice ( 1 ) . split ( '.' ) . join ( '' ) . substring ( 0 , 3 ) ) > 760 ;
1+ const isAsyncSupported = require ( 'is-async-supported' ) ;
32
4- const path = supportsAsyncAwait ? './src/index' : './dist/index' ;
3+ const path = isAsyncSupported ( ) ? './src/index' : './dist/index' ;
54
65module . exports = require ( path ) ;
Original file line number Diff line number Diff line change 2222 "node" : " >=6.0.0"
2323 },
2424 "dependencies" : {
25- "escape-regex" : " ^1.0.7"
25+ "escape-regex" : " ^1.0.7" ,
26+ "is-async-supported" : " ^1.2.0"
2627 },
2728 "devDependencies" : {
2829 "babel-cli" : " ^6.24.1" ,
Original file line number Diff line number Diff line change 1- const supportsAsyncAwait =
2- parseInt ( process . version . slice ( 1 ) . split ( '.' ) . join ( '' ) . substring ( 0 , 3 ) ) > 760 ;
1+ const isAsyncSupported = require ( 'is-async-supported' ) ;
32
4- const path = supportsAsyncAwait ? './src/unit-tests' : './dist/unit-tests' ;
3+ const path = isAsyncSupported ( ) ? './src/unit-tests' : './dist/unit-tests' ;
54
65module . exports = require ( path ) ;
Original file line number Diff line number Diff line change @@ -611,6 +611,10 @@ invariant@^2.2.0:
611611 dependencies :
612612 loose-envify "^1.0.0"
613613
614+ is-async-supported@^1.2.0 :
615+ version "1.2.0"
616+ resolved "https://registry.yarnpkg.com/is-async-supported/-/is-async-supported-1.2.0.tgz#20d58ac4d6707eb1cb3712dd38480c0536f27c07"
617+
614618is-binary-path@^1.0.0 :
615619 version "1.0.1"
616620 resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2-
32const { exec } = require ( 'shelljs' ) ;
3+ const isAsyncSupported = require ( 'is-async-supported' ) ;
44const updateNotifier = require ( 'update-notifier' ) ;
5+
56const pkg = require ( './package.json' ) ;
67
78updateNotifier ( { pkg } ) . notify ( ) ;
89
9- const supportsAsyncAwait =
10- parseInt ( process . version . slice ( 1 ) . split ( '.' ) . join ( '' ) . substring ( 0 , 3 ) ) > 760 ;
11-
12- const microAnalytics = supportsAsyncAwait ? './src/index' : './dist/index' ;
10+ const microAnalytics = isAsyncSupported ( ) ? './src/index' : './dist/index' ;
1311
1412require ( microAnalytics ) ;
Original file line number Diff line number Diff line change 3030 "dependencies" : {
3131 "args" : " ^2.3.0" ,
3232 "flat-file-db" : " ^1.0.0" ,
33+ "is-async-supported" : " ^1.2.0" ,
3334 "micro" : " 6.1.0" ,
3435 "micro-analytics-adapter-flat-file-db" : " ^1.3.0" ,
3536 "promise" : " ^7.1.1" ,
Original file line number Diff line number Diff line change @@ -898,6 +898,10 @@ is-arrayish@^0.2.1:
898898 version "0.2.1"
899899 resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
900900
901+ is-async-supported@^1.2.0 :
902+ version "1.2.0"
903+ resolved "https://registry.yarnpkg.com/is-async-supported/-/is-async-supported-1.2.0.tgz#20d58ac4d6707eb1cb3712dd38480c0536f27c07"
904+
901905is-binary-path@^1.0.0 :
902906 version "1.0.1"
903907 resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
You can’t perform that action at this time.
0 commit comments