Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't write .npmrc with shamefully-hoist=true anymore #319

Merged
merged 2 commits into from
Jan 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/commands/init.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { writeFile } from 'node:fs/promises'

Check warning on line 1 in src/commands/init.ts

View workflow job for this annotation

GitHub Actions / ci

'writeFile' is defined but never used

Check warning on line 1 in src/commands/init.ts

View workflow job for this annotation

GitHub Actions / autofix

'writeFile' is defined but never used
import { downloadTemplate, startShell } from 'giget'
import type { DownloadTemplateResult } from 'giget'
import { join, relative, resolve } from 'pathe'

Check warning on line 4 in src/commands/init.ts

View workflow job for this annotation

GitHub Actions / ci

'join' is defined but never used

Check warning on line 4 in src/commands/init.ts

View workflow job for this annotation

GitHub Actions / autofix

'join' is defined but never used
import { consola } from 'consola'
import { installDependencies } from 'nypm'
import type { PackageManagerName } from 'nypm'
Expand Down Expand Up @@ -108,12 +108,7 @@
type: 'select',
options: packageManagerOptions,
})

// Write `.npmrc` with `shamefully-hoist=true` for pnpm
if (selectedPackageManager === 'pnpm') {
await writeFile(join(template.dir, '.npmrc'), 'shamefully-hoist=true')
}


// Install project dependencies
// or skip installation based on the '--no-install' flag
if (ctx.args.install === false) {
Expand Down
Loading