Skip to content

Commit 0c048c7

Browse files
committed
[bugfix] ensure default access is public
1 parent 7b5c347 commit 0c048c7

File tree

6 files changed

+26
-2
lines changed

6 files changed

+26
-2
lines changed

lib/models/base-classes/document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Document {
3939
this.file = doc.file;
4040
this.description = doc.description;
4141
this.lineNumber = doc.line;
42-
this.access = doc.access;
42+
this.access = doc.access || 'public';
4343
this.tags = [];
4444

4545
// Clean up type tag if it exists

node-tests/fixtures/basic-class/output.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"file": "foo",
5353
"description": "A field named foo",
5454
"lineNumber": 9,
55+
"access": "public",
5556
"tags": [],
5657
"type": "number",
5758
"isStatic": false,
@@ -62,6 +63,7 @@
6263
"file": "foo",
6364
"description": "A static property named bar with a tag",
6465
"lineNumber": 17,
66+
"access": "public",
6567
"tags": [
6668
{
6769
"name": "taggg",
@@ -79,6 +81,7 @@
7981
"file": "foo",
8082
"description": "A method named corge with a tag",
8183
"lineNumber": 86,
84+
"access": "public",
8285
"tags": [
8386
{
8487
"name": "taggg",
@@ -112,6 +115,7 @@
112115
"file": "foo",
113116
"description": "A static async method named grault",
114117
"lineNumber": 99,
118+
"access": "public",
115119
"tags": [],
116120
"returns": null,
117121
"params": [],
@@ -125,6 +129,7 @@
125129
"file": "foo",
126130
"description": "A generator method named garply",
127131
"lineNumber": 110,
132+
"access": "public",
128133
"tags": [],
129134
"returns": null,
130135
"params": [],
@@ -140,6 +145,7 @@
140145
"file": "foo",
141146
"description": "An accessor named baz",
142147
"lineNumber": 27,
148+
"access": "public",
143149
"tags": [],
144150
"type": "any",
145151
"isStatic": false,
@@ -152,6 +158,7 @@
152158
"file": "foo",
153159
"description": "A static accessor named baz",
154160
"lineNumber": 41,
161+
"access": "public",
155162
"tags": [],
156163
"type": "any",
157164
"isStatic": true,
@@ -164,6 +171,7 @@
164171
"file": "foo",
165172
"description": "An accessor without a setter named qux",
166173
"lineNumber": 52,
174+
"access": "public",
167175
"tags": [],
168176
"type": "boolean",
169177
"isStatic": false,
@@ -176,6 +184,7 @@
176184
"file": "foo",
177185
"description": "A readonly accessor named quux with a tag",
178186
"lineNumber": 63,
187+
"access": "public",
179188
"tags": [
180189
{
181190
"name": "taggg",
@@ -197,6 +206,7 @@
197206
"file": "foo",
198207
"description": "A set only accessor named quux",
199208
"lineNumber": 75,
209+
"access": "public",
200210
"tags": [],
201211
"type": "any",
202212
"isStatic": false,

node-tests/fixtures/basic-component/output.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"file": "components/foo",
4848
"description": "A property named bar with a tag",
4949
"lineNumber": 19,
50+
"access": "public",
5051
"tags": [
5152
{
5253
"name": "taggg",
@@ -65,6 +66,7 @@
6566
"file": "components/foo",
6667
"description": "A method named corge with a tag",
6768
"lineNumber": 43,
69+
"access": "public",
6870
"tags": [
6971
{
7072
"name": "taggg",
@@ -98,6 +100,7 @@
98100
"file": "components/foo",
99101
"description": "An action named qux",
100102
"lineNumber": 56,
103+
"access": "public",
101104
"tags": [
102105
{
103106
"name": "action",
@@ -124,6 +127,7 @@
124127
"file": "components/foo",
125128
"description": "A computed named baz",
126129
"lineNumber": 29,
130+
"access": "public",
127131
"tags": [],
128132
"type": "any",
129133
"isStatic": false,
@@ -139,6 +143,7 @@
139143
"file": "components/foo",
140144
"description": "An argument named foo",
141145
"lineNumber": 10,
146+
"access": "public",
142147
"tags": [],
143148
"type": "number",
144149
"defaultValue": "123",

node-tests/fixtures/basic-module/output.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"name": "foo",
1414
"file": "foo",
1515
"lineNumber": 11,
16+
"access": "public",
1617
"tags": [],
1718
"returns": {
1819
"type": "string",
@@ -39,6 +40,7 @@
3940
"name": "bar",
4041
"file": "foo",
4142
"lineNumber": 22,
43+
"access": "public",
4244
"tags": [],
4345
"returns": {
4446
"type": "Array<boolean>",
@@ -55,6 +57,7 @@
5557
"file": "foo",
5658
"description": "An async function named quuz",
5759
"lineNumber": 48,
60+
"access": "public",
5861
"tags": [],
5962
"returns": null,
6063
"params": [],
@@ -67,6 +70,7 @@
6770
"file": "foo",
6871
"description": "A generator function named garply",
6972
"lineNumber": 58,
73+
"access": "public",
7074
"tags": [],
7175
"returns": null,
7276
"params": [],
@@ -81,6 +85,7 @@
8185
"name": "baz",
8286
"file": "foo",
8387
"lineNumber": 30,
88+
"access": "public",
8489
"tags": [],
8590
"type": "number",
8691
"exportType": "named"
@@ -89,6 +94,7 @@
8994
"name": "qux",
9095
"file": "foo",
9196
"lineNumber": 36,
97+
"access": "public",
9298
"tags": [],
9399
"type": "string",
94100
"exportType": "named"
@@ -97,6 +103,7 @@
97103
"name": "quux",
98104
"file": "foo",
99105
"lineNumber": 42,
106+
"access": "public",
100107
"tags": [],
101108
"type": "boolean",
102109
"exportType": "named"
@@ -126,6 +133,7 @@
126133
"name": "Foo",
127134
"file": "foo",
128135
"lineNumber": 1,
136+
"access": "public",
129137
"tags": [],
130138
"isInterface": true,
131139
"exportType": "named",

node-tests/fixtures/helper-module/output.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"name": "helper",
1515
"file": "helpers/foo",
1616
"lineNumber": 1,
17+
"access": "public",
1718
"tags": [],
1819
"returns": {
1920
"type": "string",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ember-cli-addon-docs-yuidoc",
33
"version": "0.1.0",
4-
"description": "The default blueprint for ember-cli addons.",
4+
"description": "YUIDoc plugin for ember-cli-addon-docs",
55
"keywords": [
66
"ember-addon",
77
"ember-cli-addon-docs-plugin"

0 commit comments

Comments
 (0)