mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use folder name when metadata name is empty string or non-string
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user