File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import pkgJson from '../package.json' with { type : 'json' }
22import { createRequire } from 'node:module' ;
3- import path from 'node:path' ;
3+ import { resolve } from 'node:path' ;
4+
5+ const require = createRequire ( import . meta. url ) ;
46
57const packages = {
68 '0http' : { hasRouter : true , package : '0http' } ,
@@ -33,13 +35,11 @@ const packages = {
3335 'trpc-router' : { extra : true , hasRouter : true , package : '@trpc/server' } ,
3436}
3537
36- const require = createRequire ( import . meta. url ) ;
37-
3838const _choices = [ ]
3939Object . keys ( packages ) . forEach ( pkg => {
4040 if ( ! packages [ pkg ] . version ) {
4141 const module = pkgJson . dependencies [ pkg ] ? pkg : packages [ pkg ] . package
42- const version = require ( path . resolve ( `node_modules/${ module } /package.json` ) ) . version
42+ const version = require ( resolve ( `node_modules/${ module } /package.json` ) ) . version
4343 packages [ pkg ] . version = version
4444 }
4545 _choices . push ( pkg )
You can’t perform that action at this time.
0 commit comments