Skip to content

Commit 190d15a

Browse files
Set npm package name to tinypilot (#1483)
This is a follow-up fix for [our recent NodeJS / npm upgrade](#1395). Apparently, in lock-file version 3, the `name` property is now mandatory. If the name of the package wasn’t declared explicitly in `package.json`, then npm will infer (or rather: guess) the package name from the name of the enclosing folder. In my case, I’m running my dev environment in a Docker container, and I’m mounting everything to the `/app` working directory. Therefore, npm had set the `name` property in `package-lock.json` to be `app`. If someone else runs `npm install` on their machine, and their repo folder name is different, then npm will change the `package-lock.json` file again. In order to stay independent of this (in my book rather questionable) behaviour, I suggest we just declare a `name` property in `package.json`, then npm should yield the same `package-lock.json` result regardless of the local folder name. Since we don’t publish our “package” to any registry, we could even consider to keep `tinypilot` as name for Pro (instead of adjusting to `tinypilot-pro`) – just for simplicity. <a data-ca-tag href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1483"><img src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review on CodeApprove" /></a>
1 parent 208f4f5 commit 190d15a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package-lock.json

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "tinypilot",
23
"type": "module",
34
"devDependencies": {
45
"@playwright/test": "1.35.1",

0 commit comments

Comments
 (0)