Skip to content

Commit 82211b8

Browse files
authored
Add NotificationClient as feature (#212)
1 parent 09901d0 commit 82211b8

File tree

108 files changed

+320
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+320
-119
lines changed

src/parse.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ function parseFeatures(cell, input) {
367367
cell.fileAttachments = findFeatures(cell, "FileAttachment");
368368
cell.databaseClients = findFeatures(cell, "DatabaseClient");
369369
cell.secrets = findFeatures(cell, "Secret");
370+
cell.notificationClients = findFeatures(cell, "NotificationClient");
370371
} catch (error) {
371372
if (error.node) {
372373
const loc = getLineInfo(input, error.node.start);
@@ -381,6 +382,7 @@ function parseFeatures(cell, input) {
381382
cell.fileAttachments = new Map();
382383
cell.databaseClients = new Map();
383384
cell.secrets = new Map();
385+
cell.notificationClients = new Map();
384386
}
385387
return cell;
386388
}

test/input/notification-client.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
let a = NotificationClient("slack:@claire");
3+
}

test/output/anonymous-block-cell.js.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
"references": [],
2828
"fileAttachments": [],
2929
"databaseClients": [],
30-
"secrets": []
30+
"secrets": [],
31+
"notificationClients": []
3132
}

test/output/anonymous-expression-cell.js.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
"references": [],
1616
"fileAttachments": [],
1717
"databaseClients": [],
18-
"secrets": []
18+
"secrets": [],
19+
"notificationClients": []
1920
}

test/output/anonymous-function.js.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@
3737
"references": [],
3838
"fileAttachments": [],
3939
"databaseClients": [],
40-
"secrets": []
40+
"secrets": [],
41+
"notificationClients": []
4142
}

test/output/await-block-cell.js.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@
3838
],
3939
"fileAttachments": [],
4040
"databaseClients": [],
41-
"secrets": []
41+
"secrets": [],
42+
"notificationClients": []
4243
}

test/output/await-in-arrow-function-expression.js.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@
4848
],
4949
"fileAttachments": [],
5050
"databaseClients": [],
51-
"secrets": []
51+
"secrets": [],
52+
"notificationClients": []
5253
}

test/output/await-in-arrow-function.js.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@
7474
],
7575
"fileAttachments": [],
7676
"databaseClients": [],
77-
"secrets": []
77+
"secrets": [],
78+
"notificationClients": []
7879
}

test/output/await-in-class.js.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,6 @@
8888
],
8989
"fileAttachments": [],
9090
"databaseClients": [],
91-
"secrets": []
91+
"secrets": [],
92+
"notificationClients": []
9293
}

test/output/await-in-function.js.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,6 @@
6060
],
6161
"fileAttachments": [],
6262
"databaseClients": [],
63-
"secrets": []
63+
"secrets": [],
64+
"notificationClients": []
6465
}

0 commit comments

Comments
 (0)