Skip to content

Commit

Permalink
always populate package.json name
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Oct 10, 2023
1 parent 731c0a6 commit 5f2d79c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
5 changes: 5 additions & 0 deletions cli/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,11 @@ export async function init(dir: string | undefined, options: InitOptions) {
// ok, soft patch applied, now we apply more stuff that always has to be set
// in case the project already had a package.json
const pkg = readJSON5Sync("package.json") as PackageManifest

// name needed in worspace for install to work
if (!pkg.name)
pkg.name = dir || basename(process.cwd())

// ensure cli is added
addCliDependency(pkg)
// write down
Expand Down
22 changes: 11 additions & 11 deletions vscode/src/server-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
},
{
"label": "Sensirion SHTC3",
"detail": "Start driver for Sensirion SHTC3 temperature/humidity sensor at I2C `0x70`.\r",
"detail": "Start driver for Sensirion SHTC3 temperature/humidity sensor at I2C `0x70`.",
"startName": "startSHTC3",
"classIdentifiers": [
337754823,
Expand All @@ -267,7 +267,7 @@
},
{
"label": "Sensirion SHT30",
"detail": "Start driver for Sensirion SHT30 temperature/humidity sensor at I2C `0x44` or `0x45` (default is `0x44`)\r",
"detail": "Start driver for Sensirion SHT30 temperature/humidity sensor at I2C `0x44` or `0x45` (default is `0x44`)",
"startName": "startSHT30",
"classIdentifiers": [
337754823,
Expand All @@ -280,7 +280,7 @@
},
{
"label": "AHT20",
"detail": "Start driver for AHT20 temperature/humidity sensor at I2C address `0x38`.\r",
"detail": "Start driver for AHT20 temperature/humidity sensor at I2C address `0x38`.",
"startName": "startAHT20",
"classIdentifiers": [
337754823,
Expand All @@ -293,7 +293,7 @@
},
{
"label": "LITEON LTR-390UV-01",
"detail": "Start driver for LITEON LTR-390UV-01 UV/ambient light sensor at I2C address `0x53`.\r",
"detail": "Start driver for LITEON LTR-390UV-01 UV/ambient light sensor at I2C address `0x53`.",
"startName": "startLTR390",
"classIdentifiers": [
527306128,
Expand All @@ -306,7 +306,7 @@
},
{
"label": "Bosch BME68",
"detail": "Start driver for Bosch BME680 temperature/humidity/pressure/gas sensor at I2C `0x76` (default) or `0x77`.\r",
"detail": "Start driver for Bosch BME680 temperature/humidity/pressure/gas sensor at I2C `0x76` (default) or `0x77`.",
"startName": "startBME680",
"classIdentifiers": [
337754823,
Expand All @@ -321,7 +321,7 @@
},
{
"label": "Pico Bricks for Raspberry Pi Pico",
"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",
"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}).",
"startName": "PicoBricks",
"imports": {
"PicoBricks": "@devicescript/drivers"
Expand All @@ -330,7 +330,7 @@
},
{
"label": "Seeed Studio XIAO Expansion Board",
"detail": "Drivers for the {@link https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/ | Seeed Studio XIAO Expansion Board }.\r",
"detail": "Drivers for the {@link https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/ | Seeed Studio XIAO Expansion Board }.",
"startName": "XiaoExpansionBoard",
"imports": {
"XiaoExpansionBoard": "@devicescript/drivers"
Expand All @@ -339,7 +339,7 @@
},
{
"label": "Grove Shield for Seeed Studio XIAO",
"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",
"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.",
"startName": "XiaoGroveShield",
"imports": {
"XiaoGroveShield": "@devicescript/drivers"
Expand All @@ -348,7 +348,7 @@
},
{
"label": "WaveShare Pico LCD114 for Raspberry Pi Pico",
"detail": "Driver for WaveShare Pico-LCD-1.14 inch.\r",
"detail": "Driver for WaveShare Pico-LCD-1.14 inch.",
"startName": "WaveSharePicoLCD114",
"imports": {
"WaveSharePicoLCD114": "@devicescript/drivers"
Expand All @@ -357,7 +357,7 @@
},
{
"label": "Pimoroni Pico Badger",
"detail": "Support for Badger 2040 W (Pico W Aboard)\r",
"detail": "Support for Badger 2040 W (Pico W Aboard)",
"startName": "PimoroniBadger2040W",
"imports": {
"PimoroniBadger2040W": "@devicescript/drivers"
Expand All @@ -366,7 +366,7 @@
},
{
"label": "KittenBot Grape:bit ESP32-C3",
"detail": "Support for KittenBot Grape:bit ESP32-C3\r",
"detail": "Support for KittenBot Grape:bit ESP32-C3",
"startName": "KittenBotGrapeBit",
"imports": {
"KittenBotGrapeBit": "@devicescript/drivers"
Expand Down

0 comments on commit 5f2d79c

Please sign in to comment.