Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Commit 5f2d79c

Browse files
committed
always populate package.json name
1 parent 731c0a6 commit 5f2d79c

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

cli/src/init.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,11 @@ export async function init(dir: string | undefined, options: InitOptions) {
450450
// ok, soft patch applied, now we apply more stuff that always has to be set
451451
// in case the project already had a package.json
452452
const pkg = readJSON5Sync("package.json") as PackageManifest
453+
454+
// name needed in worspace for install to work
455+
if (!pkg.name)
456+
pkg.name = dir || basename(process.cwd())
457+
453458
// ensure cli is added
454459
addCliDependency(pkg)
455460
// write down

vscode/src/server-info.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
},
255255
{
256256
"label": "Sensirion SHTC3",
257-
"detail": "Start driver for Sensirion SHTC3 temperature/humidity sensor at I2C `0x70`.\r",
257+
"detail": "Start driver for Sensirion SHTC3 temperature/humidity sensor at I2C `0x70`.",
258258
"startName": "startSHTC3",
259259
"classIdentifiers": [
260260
337754823,
@@ -267,7 +267,7 @@
267267
},
268268
{
269269
"label": "Sensirion SHT30",
270-
"detail": "Start driver for Sensirion SHT30 temperature/humidity sensor at I2C `0x44` or `0x45` (default is `0x44`)\r",
270+
"detail": "Start driver for Sensirion SHT30 temperature/humidity sensor at I2C `0x44` or `0x45` (default is `0x44`)",
271271
"startName": "startSHT30",
272272
"classIdentifiers": [
273273
337754823,
@@ -280,7 +280,7 @@
280280
},
281281
{
282282
"label": "AHT20",
283-
"detail": "Start driver for AHT20 temperature/humidity sensor at I2C address `0x38`.\r",
283+
"detail": "Start driver for AHT20 temperature/humidity sensor at I2C address `0x38`.",
284284
"startName": "startAHT20",
285285
"classIdentifiers": [
286286
337754823,
@@ -293,7 +293,7 @@
293293
},
294294
{
295295
"label": "LITEON LTR-390UV-01",
296-
"detail": "Start driver for LITEON LTR-390UV-01 UV/ambient light sensor at I2C address `0x53`.\r",
296+
"detail": "Start driver for LITEON LTR-390UV-01 UV/ambient light sensor at I2C address `0x53`.",
297297
"startName": "startLTR390",
298298
"classIdentifiers": [
299299
527306128,
@@ -306,7 +306,7 @@
306306
},
307307
{
308308
"label": "Bosch BME68",
309-
"detail": "Start driver for Bosch BME680 temperature/humidity/pressure/gas sensor at I2C `0x76` (default) or `0x77`.\r",
309+
"detail": "Start driver for Bosch BME680 temperature/humidity/pressure/gas sensor at I2C `0x76` (default) or `0x77`.",
310310
"startName": "startBME680",
311311
"classIdentifiers": [
312312
337754823,
@@ -321,7 +321,7 @@
321321
},
322322
{
323323
"label": "Pico Bricks for Raspberry Pi Pico",
324-
"detail": "Drivers for the {@link https://shop.robotistan.com/products/pico-bricks | Pico Bricks } shield for Raspberry Pi Pico ({@link https://github.com/Robotistan/PicoBricks/tree/main/Documents | datasheets}).\r",
324+
"detail": "Drivers for the {@link https://shop.robotistan.com/products/pico-bricks | Pico Bricks } shield for Raspberry Pi Pico ({@link https://github.com/Robotistan/PicoBricks/tree/main/Documents | datasheets}).",
325325
"startName": "PicoBricks",
326326
"imports": {
327327
"PicoBricks": "@devicescript/drivers"
@@ -330,7 +330,7 @@
330330
},
331331
{
332332
"label": "Seeed Studio XIAO Expansion Board",
333-
"detail": "Drivers for the {@link https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/ | Seeed Studio XIAO Expansion Board }.\r",
333+
"detail": "Drivers for the {@link https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/ | Seeed Studio XIAO Expansion Board }.",
334334
"startName": "XiaoExpansionBoard",
335335
"imports": {
336336
"XiaoExpansionBoard": "@devicescript/drivers"
@@ -339,7 +339,7 @@
339339
},
340340
{
341341
"label": "Grove Shield for Seeed Studio XIAO",
342-
"detail": "Drivers for the {@link https://www.seeedstudio.com/Grove-Shield-for-Seeeduino-XIAO-p-4621.html | Grove Shield for Seeed Studio XIAO } for Raspberry Pi Pico.\r",
342+
"detail": "Drivers for the {@link https://www.seeedstudio.com/Grove-Shield-for-Seeeduino-XIAO-p-4621.html | Grove Shield for Seeed Studio XIAO } for Raspberry Pi Pico.",
343343
"startName": "XiaoGroveShield",
344344
"imports": {
345345
"XiaoGroveShield": "@devicescript/drivers"
@@ -348,7 +348,7 @@
348348
},
349349
{
350350
"label": "WaveShare Pico LCD114 for Raspberry Pi Pico",
351-
"detail": "Driver for WaveShare Pico-LCD-1.14 inch.\r",
351+
"detail": "Driver for WaveShare Pico-LCD-1.14 inch.",
352352
"startName": "WaveSharePicoLCD114",
353353
"imports": {
354354
"WaveSharePicoLCD114": "@devicescript/drivers"
@@ -357,7 +357,7 @@
357357
},
358358
{
359359
"label": "Pimoroni Pico Badger",
360-
"detail": "Support for Badger 2040 W (Pico W Aboard)\r",
360+
"detail": "Support for Badger 2040 W (Pico W Aboard)",
361361
"startName": "PimoroniBadger2040W",
362362
"imports": {
363363
"PimoroniBadger2040W": "@devicescript/drivers"
@@ -366,7 +366,7 @@
366366
},
367367
{
368368
"label": "KittenBot Grape:bit ESP32-C3",
369-
"detail": "Support for KittenBot Grape:bit ESP32-C3\r",
369+
"detail": "Support for KittenBot Grape:bit ESP32-C3",
370370
"startName": "KittenBotGrapeBit",
371371
"imports": {
372372
"KittenBotGrapeBit": "@devicescript/drivers"

0 commit comments

Comments
 (0)