File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 11import './js/ios10Fix' ;
22
3- import packageJson from './package.json' ;
4-
53export * from './js/URL' ;
64export * from './js/URLSearchParams' ;
75
86export function setupURLPolyfill ( ) {
9- globalThis . REACT_NATIVE_URL_POLYFILL = ` ${ packageJson . name } @ ${ packageJson . version } ` ;
7+ globalThis . REACT_NATIVE_URL_POLYFILL = '<INJECT_VERSION>' ;
108
119 globalThis . URL = require ( './js/URL' ) . URL ;
1210 globalThis . URLSearchParams = require ( './js/URLSearchParams' ) . URLSearchParams ;
Original file line number Diff line number Diff line change 2525 "lint" : " eslint ." ,
2626 "type-check" : " tsc index.d.ts" ,
2727 "prepare" : " husky install" ,
28+ "prepublishOnly" : " node scripts/prepublish" ,
2829 "bundle-size" : " node scripts/bundle-size"
2930 },
3031 "author" : " Nicolas Charpentier <nicolas.charpentier079@gmail.com>" ,
Original file line number Diff line number Diff line change 1+ #!/usr/bin/node
2+ const fs = require ( 'node:fs' ) ;
3+
4+ const packageJson = require ( '../package.json' ) ;
5+ const path = require . resolve ( '../index.js' ) ;
6+
7+ fs . writeFileSync (
8+ path ,
9+ fs
10+ . readFileSync ( path , 'utf8' )
11+ . replace ( '<INJECT_VERSION>' , `${ packageJson . name } @${ packageJson . version } ` ) ,
12+ ) ;
You can’t perform that action at this time.
0 commit comments