Skip to content
This repository was archived by the owner on Apr 21, 2022. It is now read-only.

Commit f6ec36e

Browse files
committed
fix: manifest with leading slash
1 parent 6fb3dc6 commit f6ec36e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"node": ">=8.0.0"
4848
},
4949
"files": [
50-
"oclif.manifest.json",
50+
"/oclif.manifest.json",
5151
"/bin",
5252
"/lib"
5353
],

src/commands/manifest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ export default class Manifest extends Command {
3131
}
3232
const file = path.join(plugin.root, 'oclif.manifest.json')
3333
fs.writeFileSync(file, JSON.stringify(plugin.manifest))
34-
if (this.config.pjson.files.includes('.oclif.manifest.json')) {
34+
if (this.config.pjson.files.find((f: string) => f.endsWith('.oclif.manifest.json'))) {
3535
const pjson = await fs.readJSON('package.json')
36-
pjson.files = pjson.files.map((f: string) => f === '.oclif.manifest.json' ? 'oclif.manifest.json' : f)
36+
pjson.files = pjson.files.map((f: string) => f.replace(/\.oclif\.manifest\.json$/, 'oclif.manifest.json'))
3737
await fs.outputJSON('package.json', pjson, {spaces: 2})
3838
}
3939
this.log(`wrote manifest to ${file}`)

0 commit comments

Comments
 (0)