mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Use folder name when metadata name is empty string or non-string
This commit is contained in:
parent
4d76e607f0
commit
0edce07446
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "package-with-invalid-selectors",
|
||||
"name": "package-with-invalid-commands",
|
||||
"version": "1.0.0",
|
||||
"activationCommands": {
|
||||
"<>": [
|
||||
|
@ -1 +1 @@
|
||||
'main': 'main-module.coffee'
|
||||
'main': 'main-module.coffee'
|
||||
|
@ -45,7 +45,8 @@ class Package
|
||||
throw error unless ignoreErrors
|
||||
|
||||
metadata ?= {}
|
||||
metadata.name ?= packageName
|
||||
unless typeof metadata.name is 'string' and metadata.name.length > 0
|
||||
metadata.name = packageName
|
||||
|
||||
if includeDeprecatedAPIs and metadata.stylesheetMain?
|
||||
deprecate("Use the `mainStyleSheet` key instead of `stylesheetMain` in the `package.json` of `#{packageName}`", {packageName})
|
||||
|
Loading…
Reference in New Issue
Block a user