Skip to content

Commit

Permalink
fix: put npmrc file in each package
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Sep 28, 2023
1 parent 72127b1 commit 16d506a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ async function releaseGithub (repoInfos: RepositoryInfos, version: string, relea
}

async function publishNpm (version: string) {
await fs.writeFile('.npmrc', `//registry.npmjs.org/:_authToken=${NPM_TOKEN}\n`)

const distDir = path.resolve(__dirname, 'dist')
for (const dirName of await fs.readdir(distDir)) {
const libDir = path.resolve(distDir, dirName)
Expand All @@ -150,6 +148,7 @@ async function publishNpm (version: string) {
packageJson.dependencies[dependency] = version
}
}
await fs.writeFile(path.resolve(libDir, '.npmrc'), `//registry.npmjs.org/:_authToken=${NPM_TOKEN}\n`)
await fs.writeFile(packageJsonFile, JSON.stringify(packageJson, null, 2))

$.cwd = libDir
Expand Down

0 comments on commit 16d506a

Please sign in to comment.