Skip to content

Commit c9d6ac0

Browse files
authored
Fix pnpm being detected as npm (#110)
* Fix pnpm being detected as npm * Set version to 1.12.0-beta.2 * Tag npm packages as "next" immediately
1 parent 84492ec commit c9d6ac0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ jobs:
108108
with:
109109
name: ${{ needs.build.outputs.artifact_filename }}
110110

111-
- name: Publish packages on npm with tag "ci"
111+
- name: Publish packages on npm with tag "next"
112112
env:
113113
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
114114
run: |
115-
npm publish ${{ needs.build.outputs.artifact_filename }} --tag ci
115+
npm publish ${{ needs.build.outputs.artifact_filename }} --tag next

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-rescript-app",
3-
"version": "1.12.0-beta.1",
3+
"version": "1.12.0-beta.2",
44
"description": "Quickly create new ReScript apps from project templates.",
55
"main": "out/create-rescript-app.cjs",
66
"scripts": {

src/PackageManagers.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ let getPackageManagerInfo = async () =>
3535
let filename = Path.parse(execPath).name->String.toLowerCase
3636

3737
let packageManager = switch () {
38-
| _ if filename->String.includes("npm") => Some(Npm)
3938
| _ if filename->String.includes("yarn") =>
4039
let versionResult = await Promisified.ChildProcess.exec(`${command} --version`)
4140
let version = versionResult.stdout->String.trim
4241
let isYarn1 = CompareVersions.compareVersions(version, "2.0.0")->Ordering.isLess
4342

4443
Some(isYarn1 ? Yarn1 : YarnBerry)
4544
| _ if filename->String.includes("pnpm") => Some(Pnpm)
45+
| _ if filename->String.includes("npm") => Some(Npm) // make sure this goes after pnpm ...
4646
| _ if filename->String.includes("bun") => Some(Bun)
4747
| _ => None
4848
}

0 commit comments

Comments
 (0)