File tree Expand file tree Collapse file tree
packages/yarnpkg-sdks/sources Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ releases :
2+ " @yarnpkg/sdks " : patch
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ export class Wrapper {
205205 this . target = target ;
206206 }
207207
208- async writeManifest ( ) {
208+ async writeManifest ( rawManifest : Record < string , any > = { } ) {
209209 const absWrapperPath = ppath . join ( this . target , this . name , `package.json` ) ;
210210
211211 const topLevelInformation = this . pnpApi . getPackageInformation ( this . pnpApi . topLevel ) ! ;
@@ -223,10 +223,11 @@ export class Wrapper {
223223 version : `${ manifest . version } -sdk` ,
224224 main : manifest . main ,
225225 type : `commonjs` ,
226+ ...rawManifest ,
226227 } ) ;
227228 }
228229
229- async writeBinary ( relPackagePath : PortablePath , options : TemplateOptions = { } ) {
230+ async writeBinary ( relPackagePath : PortablePath , options : TemplateOptions & { requirePath ?: PortablePath } = { } ) {
230231 await this . writeFile ( relPackagePath , { ...options , mode : 0o755 } ) ;
231232 }
232233
Original file line number Diff line number Diff line change @@ -27,9 +27,11 @@ export const generateEslintBaseWrapper: GenerateBaseWrapper = async (pnpApi: Pnp
2727export const generatePrettierBaseWrapper : GenerateBaseWrapper = async ( pnpApi : PnpApi , target : PortablePath ) => {
2828 const wrapper = new Wrapper ( `prettier` as PortablePath , { pnpApi, target} ) ;
2929
30- await wrapper . writeManifest ( ) ;
30+ await wrapper . writeManifest ( {
31+ main : `./index.js` ,
32+ } ) ;
3133
32- await wrapper . writeBinary ( `index.js` as PortablePath ) ;
34+ await wrapper . writeBinary ( `index.js` as PortablePath , { requirePath : `` as PortablePath } ) ;
3335
3436 return wrapper ;
3537} ;
You can’t perform that action at this time.
0 commit comments