@forge/lint 5.12.0-next.9 → 5.12.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,165 @@
1
1
  # @forge/lint
2
2
 
3
+ ## 5.12.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e1a1a98]
8
+ - @forge/cli-shared@8.9.1-next.0
9
+
10
+ ## 5.12.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 414eba9: Add LLM module to manifest if sdk in use
15
+ - 738ce50: Add permission linter for Realtime subscribeGlobal method
16
+ - 003d118: Update LLM SDK name. Update to show single error
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [0a3f5d5]
21
+ - Updated dependencies [9b1b358]
22
+ - Updated dependencies [ee02b2c]
23
+ - Updated dependencies [9a6d346]
24
+ - Updated dependencies [16bf52e]
25
+ - Updated dependencies [260eb24]
26
+ - Updated dependencies [49bbec0]
27
+ - Updated dependencies [8cac1e4]
28
+ - Updated dependencies [6ab8f99]
29
+ - Updated dependencies [3228cf0]
30
+ - Updated dependencies [debdb02]
31
+ - Updated dependencies [9f537fe]
32
+ - Updated dependencies [88238e7]
33
+ - Updated dependencies [8962080]
34
+ - Updated dependencies [428a2be]
35
+ - Updated dependencies [ef033a5]
36
+ - Updated dependencies [118f8af]
37
+ - Updated dependencies [5efbe5a]
38
+ - Updated dependencies [aaf8a03]
39
+ - Updated dependencies [24bd686]
40
+ - Updated dependencies [0c433a0]
41
+ - Updated dependencies [f0a5a03]
42
+ - Updated dependencies [2011ffe]
43
+ - Updated dependencies [d00ef59]
44
+ - Updated dependencies [78efec7]
45
+ - @forge/manifest@11.0.0
46
+ - @forge/cli-shared@8.9.0
47
+ - @forge/csp@5.3.0
48
+
49
+ ## 5.12.0-next.24
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies [428a2be]
54
+ - Updated dependencies [0c433a0]
55
+ - @forge/csp@5.3.0-next.3
56
+ - @forge/manifest@11.0.0-next.10
57
+ - @forge/cli-shared@8.9.0-next.19
58
+
59
+ ## 5.12.0-next.23
60
+
61
+ ### Minor Changes
62
+
63
+ - 003d118: Update LLM SDK name. Update to show single error
64
+
65
+ ## 5.12.0-next.22
66
+
67
+ ### Patch Changes
68
+
69
+ - Updated dependencies [88238e7]
70
+ - @forge/manifest@11.0.0-next.9
71
+ - @forge/cli-shared@8.9.0-next.18
72
+
73
+ ## 5.12.0-next.21
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies [9b1b358]
78
+ - @forge/cli-shared@8.9.0-next.17
79
+
80
+ ## 5.12.0-next.20
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [9f537fe]
85
+ - @forge/cli-shared@8.9.0-next.16
86
+
87
+ ## 5.12.0-next.19
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [24bd686]
92
+ - Updated dependencies [2011ffe]
93
+ - @forge/manifest@11.0.0-next.8
94
+ - @forge/cli-shared@8.9.0-next.15
95
+
96
+ ## 5.12.0-next.18
97
+
98
+ ### Patch Changes
99
+
100
+ - Updated dependencies [16bf52e]
101
+ - @forge/cli-shared@8.9.0-next.14
102
+
103
+ ## 5.12.0-next.17
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [0a3f5d5]
108
+ - @forge/manifest@11.0.0-next.7
109
+ - @forge/cli-shared@8.9.0-next.13
110
+
111
+ ## 5.12.0-next.16
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [118f8af]
116
+ - @forge/cli-shared@8.9.0-next.12
117
+
118
+ ## 5.12.0-next.15
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated dependencies [d00ef59]
123
+ - @forge/manifest@11.0.0-next.6
124
+ - @forge/cli-shared@8.9.0-next.11
125
+
126
+ ## 5.12.0-next.14
127
+
128
+ ### Patch Changes
129
+
130
+ - Updated dependencies [6ab8f99]
131
+ - @forge/cli-shared@8.9.0-next.10
132
+
133
+ ## 5.12.0-next.13
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [f0a5a03]
138
+ - @forge/manifest@11.0.0-next.5
139
+ - @forge/cli-shared@8.9.0-next.9
140
+
141
+ ## 5.12.0-next.12
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [3228cf0]
146
+ - @forge/manifest@11.0.0-next.4
147
+ - @forge/cli-shared@8.9.0-next.8
148
+
149
+ ## 5.12.0-next.11
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies [8cac1e4]
154
+ - @forge/csp@5.3.0-next.2
155
+
156
+ ## 5.12.0-next.10
157
+
158
+ ### Patch Changes
159
+
160
+ - Updated dependencies [49bbec0]
161
+ - @forge/cli-shared@8.9.0-next.7
162
+
3
163
  ## 5.12.0-next.9
4
164
 
5
165
  ### Patch Changes
@@ -5,5 +5,5 @@ export interface LLMModuleLintCriteriaMatch extends LintCriteriaMatch {
5
5
  export interface LLMModuleMatches {
6
6
  [key: string]: LLMModuleLintCriteriaMatch[];
7
7
  }
8
- export declare const LLM_SDK_PACKAGE = "@atlassian/forge-llms-sdk";
8
+ export declare const LLM_SDK_PACKAGE = "@forge/llm";
9
9
  //# sourceMappingURL=llm-linter-interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"llm-linter-interface.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/llm-module-linter/llm-linter-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,0BAA0B,EAAE,CAAC;CAC7C;AAED,eAAO,MAAM,eAAe,8BAA8B,CAAC"}
1
+ {"version":3,"file":"llm-linter-interface.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/llm-module-linter/llm-linter-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,0BAA0B,EAAE,CAAC;CAC7C;AAED,eAAO,MAAM,eAAe,eAAe,CAAC"}
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LLM_SDK_PACKAGE = void 0;
4
- exports.LLM_SDK_PACKAGE = '@atlassian/forge-llms-sdk';
4
+ exports.LLM_SDK_PACKAGE = '@forge/llm';
@@ -3,7 +3,7 @@ import { LLMModuleLintCriteriaMatch } from './llm-linter-interface';
3
3
  import { TSESTree } from '@typescript-eslint/typescript-estree';
4
4
  export declare class LlmNodeVisitor implements NodeVisitor<LLMModuleLintCriteriaMatch> {
5
5
  visit(node: TSESTree.Node, _parent: TSESTree.Node | undefined, onMatchCallback: (llmModuleCall: LLMModuleLintCriteriaMatch) => void): void;
6
- private isNodeSDKPackageImport;
6
+ private isLLMSDKPackageImport;
7
7
  private isImportSpecifier;
8
8
  }
9
9
  //# sourceMappingURL=llm-node-visitor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"llm-node-visitor.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/llm-module-linter/llm-node-visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAmB,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAkB,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhF,qBAAa,cAAe,YAAW,WAAW,CAAC,0BAA0B,CAAC;IACrE,KAAK,CACV,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,OAAO,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,EAClC,eAAe,EAAE,CAAC,aAAa,EAAE,0BAA0B,KAAK,IAAI;IAgBtE,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,iBAAiB;CAM1B"}
1
+ {"version":3,"file":"llm-node-visitor.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/llm-module-linter/llm-node-visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAmB,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAkB,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhF,qBAAa,cAAe,YAAW,WAAW,CAAC,0BAA0B,CAAC;IACrE,KAAK,CACV,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,OAAO,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,EAClC,eAAe,EAAE,CAAC,aAAa,EAAE,0BAA0B,KAAK,IAAI;IActE,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,iBAAiB;CAM1B"}
@@ -5,20 +5,17 @@ const llm_linter_interface_1 = require("./llm-linter-interface");
5
5
  const typescript_estree_1 = require("@typescript-eslint/typescript-estree");
6
6
  class LlmNodeVisitor {
7
7
  visit(node, _parent, onMatchCallback) {
8
- if (this.isNodeSDKPackageImport(node) && 'specifiers' in node) {
9
- node.specifiers.forEach((specifier) => {
10
- if (this.isImportSpecifier(specifier)) {
11
- if (specifier.loc) {
12
- onMatchCallback({
13
- type: 'llm',
14
- ...specifier.loc.start
15
- });
16
- }
17
- }
18
- });
8
+ if (this.isLLMSDKPackageImport(node) && 'specifiers' in node) {
9
+ const specifier = node.specifiers.find((spec) => this.isImportSpecifier(spec));
10
+ if (specifier?.loc) {
11
+ onMatchCallback({
12
+ type: 'llm',
13
+ ...specifier.loc.start
14
+ });
15
+ }
19
16
  }
20
17
  }
21
- isNodeSDKPackageImport(node) {
18
+ isLLMSDKPackageImport(node) {
22
19
  return node.type === typescript_estree_1.AST_NODE_TYPES.ImportDeclaration && node.source.value === llm_linter_interface_1.LLM_SDK_PACKAGE;
23
20
  }
24
21
  isImportSpecifier(specifier) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/lint",
3
- "version": "5.12.0-next.9",
3
+ "version": "5.12.1-next.0",
4
4
  "description": "Linting for forge apps",
5
5
  "main": "out/index.js",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "devDependencies": {
13
13
  "@atlassian/xen-test-util": "^4.2.0",
14
- "@forge/api": "^6.1.6-next.0",
14
+ "@forge/api": "^6.2.0",
15
15
  "@types/array.prototype.flatmap": "^1.2.6",
16
16
  "@types/cross-spawn": "^6.0.6",
17
17
  "@types/eslint": "8.56.12",
@@ -19,10 +19,10 @@
19
19
  "eslint-plugin-import": "^2.29.1"
20
20
  },
21
21
  "dependencies": {
22
- "@forge/cli-shared": "8.9.0-next.6",
23
- "@forge/csp": "5.3.0-next.1",
22
+ "@forge/cli-shared": "8.9.1-next.0",
23
+ "@forge/csp": "5.3.0",
24
24
  "@forge/egress": "2.1.1",
25
- "@forge/manifest": "11.0.0-next.3",
25
+ "@forge/manifest": "11.0.0",
26
26
  "@typescript-eslint/typescript-estree": "^5.62.0",
27
27
  "array.prototype.flatmap": "^1.3.3",
28
28
  "@atlassian/atlassian-openapi": "^1.0.6",