Skip to content

Commit 586b9d2

Browse files
authored
Merge branch 'dev' into chore/VCST-2553-maska-input
2 parents 5c2ae69 + 9f717d0 commit 586b9d2

File tree

119 files changed

+1277
-194
lines changed

Some content is hidden

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

119 files changed

+1277
-194
lines changed

.dependency-cruiser.cjs

Lines changed: 91 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -2,206 +2,189 @@
22
module.exports = {
33
forbidden: [
44
{
5-
name: 'no-circular',
6-
severity: 'warn',
5+
name: "no-circular",
6+
severity: "warn",
77
comment:
8-
'This dependency is part of a circular relationship. You might want to revise ' +
9-
'your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ',
8+
"This dependency is part of a circular relationship. You might want to revise " +
9+
"your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ",
1010
from: {},
1111
to: {
12-
circular: true
13-
}
12+
circular: true,
13+
},
1414
},
1515
{
16-
name: 'no-orphans',
16+
name: "no-orphans",
1717
comment:
1818
"This is an orphan module - it's likely not used (anymore?). Either use it or " +
1919
"remove it. If it's logical this module is an orphan (i.e. it's a config file), " +
2020
"add an exception for it in your dependency-cruiser configuration. By default " +
2121
"this rule does not scrutinize dot-files, TypeScript declaration " +
2222
"files (.d.ts), tsconfig.json and some of the babel and webpack configs.",
23-
severity: 'warn',
23+
severity: "warn",
2424
from: {
2525
orphan: true,
2626
pathNot: [
27-
'(^|/)[.][^/]+[.](js|cjs|mjs|ts|json)$', // dot files
28-
'[.]d[.]ts$', // TypeScript declaration files
29-
'(^|/)tsconfig[.]json$', // TypeScript config
30-
'(^|/)(babel|webpack)[.]config[.](js|cjs|mjs|ts|json)$' // other configs
31-
]
27+
"(^|/)[.][^/]+[.](js|cjs|mjs|ts|json)$", // dot files
28+
"[.]d[.]ts$", // TypeScript declaration files
29+
"(^|/)tsconfig[.]json$", // TypeScript config
30+
"(^|/)(babel|webpack)[.]config[.](js|cjs|mjs|ts|json)$", // other configs
31+
],
3232
},
3333
to: {},
3434
},
3535
{
36-
name: 'no-deprecated-core',
36+
name: "no-deprecated-core",
3737
comment:
38-
'A module depends on a node core module that has been deprecated. Find an alternative - these are ' +
38+
"A module depends on a node core module that has been deprecated. Find an alternative - these are " +
3939
"bound to exist - node doesn't deprecate lightly.",
40-
severity: 'warn',
40+
severity: "warn",
4141
from: {},
4242
to: {
43-
dependencyTypes: [
44-
'core'
45-
],
43+
dependencyTypes: ["core"],
4644
path: [
47-
'^(v8/tools/codemap)$',
48-
'^(v8/tools/consarray)$',
49-
'^(v8/tools/csvparser)$',
50-
'^(v8/tools/logreader)$',
51-
'^(v8/tools/profile_view)$',
52-
'^(v8/tools/profile)$',
53-
'^(v8/tools/SourceMap)$',
54-
'^(v8/tools/splaytree)$',
55-
'^(v8/tools/tickprocessor-driver)$',
56-
'^(v8/tools/tickprocessor)$',
57-
'^(node-inspect/lib/_inspect)$',
58-
'^(node-inspect/lib/internal/inspect_client)$',
59-
'^(node-inspect/lib/internal/inspect_repl)$',
60-
'^(async_hooks)$',
61-
'^(punycode)$',
62-
'^(domain)$',
63-
'^(constants)$',
64-
'^(sys)$',
65-
'^(_linklist)$',
66-
'^(_stream_wrap)$'
45+
"^(v8/tools/codemap)$",
46+
"^(v8/tools/consarray)$",
47+
"^(v8/tools/csvparser)$",
48+
"^(v8/tools/logreader)$",
49+
"^(v8/tools/profile_view)$",
50+
"^(v8/tools/profile)$",
51+
"^(v8/tools/SourceMap)$",
52+
"^(v8/tools/splaytree)$",
53+
"^(v8/tools/tickprocessor-driver)$",
54+
"^(v8/tools/tickprocessor)$",
55+
"^(node-inspect/lib/_inspect)$",
56+
"^(node-inspect/lib/internal/inspect_client)$",
57+
"^(node-inspect/lib/internal/inspect_repl)$",
58+
"^(async_hooks)$",
59+
"^(punycode)$",
60+
"^(domain)$",
61+
"^(constants)$",
62+
"^(sys)$",
63+
"^(_linklist)$",
64+
"^(_stream_wrap)$",
6765
],
68-
}
66+
},
6967
},
7068
{
71-
name: 'not-to-deprecated',
69+
name: "not-to-deprecated",
7270
comment:
73-
'This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later ' +
74-
'version of that module, or find an alternative. Deprecated modules are a security risk.',
75-
severity: 'warn',
71+
"This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later " +
72+
"version of that module, or find an alternative. Deprecated modules are a security risk.",
73+
severity: "warn",
7674
from: {},
7775
to: {
78-
dependencyTypes: [
79-
'deprecated'
80-
]
81-
}
76+
dependencyTypes: ["deprecated"],
77+
},
8278
},
8379
{
84-
name: 'no-non-package-json',
85-
severity: 'error',
80+
name: "no-non-package-json",
81+
severity: "error",
8682
comment:
8783
"This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " +
8884
"That's problematic as the package either (1) won't be available on live (2 - worse) will be " +
8985
"available on live with an non-guaranteed version. Fix it by adding the package to the dependencies " +
9086
"in your package.json.",
9187
from: {},
9288
to: {
93-
dependencyTypes: [
94-
'npm-no-pkg',
95-
'npm-unknown'
96-
]
97-
}
89+
dependencyTypes: ["npm-no-pkg", "npm-unknown"],
90+
},
9891
},
9992
{
100-
name: 'not-to-unresolvable',
93+
name: "not-to-unresolvable",
10194
comment:
10295
"This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " +
103-
'module: add it to your package.json. In all other cases you likely already know what to do.',
104-
severity: 'error',
96+
"module: add it to your package.json. In all other cases you likely already know what to do.",
97+
severity: "error",
10598
from: {},
10699
to: {
107-
couldNotResolve: true
108-
}
100+
couldNotResolve: true,
101+
},
109102
},
110103
{
111-
name: 'no-duplicate-dep-types',
104+
name: "no-duplicate-dep-types",
112105
comment:
113106
"Likely this module depends on an external ('npm') package that occurs more than once " +
114107
"in your package.json i.e. bot as a devDependencies and in dependencies. This will cause " +
115108
"maintenance problems later on.",
116-
severity: 'warn',
109+
severity: "warn",
117110
from: {},
118111
to: {
119112
moreThanOneDependencyType: true,
120113
// as it's pretty common to have a type import be a type only import
121114
// _and_ (e.g.) a devDependency - don't consider type-only dependency
122115
// types for this rule
123-
dependencyTypesNot: ["type-only"]
124-
}
116+
dependencyTypesNot: ["type-only"],
117+
},
125118
},
126119

127120
/* rules you might want to tweak for your specific situation: */
128121

129122
{
130-
name: 'not-to-spec',
123+
name: "not-to-spec",
131124
comment:
132-
'This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. ' +
125+
"This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. " +
133126
"If there's something in a spec that's of use to other modules, it doesn't have that single " +
134-
'responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.',
135-
severity: 'error',
127+
"responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.",
128+
severity: "error",
136129
from: {},
137130
to: {
138-
path: '[.](spec|test)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$'
139-
}
131+
path: "[.](spec|test)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$",
132+
},
140133
},
141134
{
142-
name: 'not-to-dev-dep',
143-
severity: 'error',
135+
name: "not-to-dev-dep",
136+
severity: "error",
144137
comment:
145138
"This module depends on an npm package from the 'devDependencies' section of your " +
146-
'package.json. It looks like something that ships to production, though. To prevent problems ' +
139+
"package.json. It looks like something that ships to production, though. To prevent problems " +
147140
"with npm packages that aren't there on production declare it (only!) in the 'dependencies'" +
148-
'section of your package.json. If this module is development only - add it to the ' +
149-
'from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration',
141+
"section of your package.json. If this module is development only - add it to the " +
142+
"from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration",
150143
from: {
151-
path: '^(client-app)',
152-
pathNot: '[.](spec|test|test-d|mock)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$'
144+
path: "^(client-app)",
145+
pathNot: "[.](spec|test|test-d|mock)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$",
153146
},
154147
to: {
155-
dependencyTypes: [
156-
'npm-dev',
157-
],
148+
dependencyTypes: ["npm-dev"],
158149
// type only dependencies are not a problem as they don't end up in the
159150
// production code or are ignored by the runtime.
160-
dependencyTypesNot: [
161-
'type-only'
162-
],
163-
pathNot: [
164-
'node_modules/@types/'
165-
]
166-
}
151+
dependencyTypesNot: ["type-only"],
152+
pathNot: ["node_modules/@types/"],
153+
},
167154
},
168155
{
169-
name: 'optional-deps-used',
170-
severity: 'info',
156+
name: "optional-deps-used",
157+
severity: "info",
171158
comment:
172159
"This module depends on an npm package that is declared as an optional dependency " +
173160
"in your package.json. As this makes sense in limited situations only, it's flagged here. " +
174161
"If you're using an optional dependency here by design - add an exception to your" +
175162
"dependency-cruiser configuration.",
176163
from: {},
177164
to: {
178-
dependencyTypes: [
179-
'npm-optional'
180-
]
181-
}
165+
dependencyTypes: ["npm-optional"],
166+
},
182167
},
183168
{
184-
name: 'peer-deps-used',
169+
name: "peer-deps-used",
185170
comment:
186171
"This module depends on an npm package that is declared as a peer dependency " +
187172
"in your package.json. This makes sense if your package is e.g. a plugin, but in " +
188173
"other cases - maybe not so much. If the use of a peer dependency is intentional " +
189174
"add an exception to your dependency-cruiser configuration.",
190-
severity: 'warn',
175+
severity: "warn",
191176
from: {},
192177
to: {
193-
dependencyTypes: [
194-
'npm-peer'
195-
]
196-
}
197-
}
178+
dependencyTypes: ["npm-peer"],
179+
},
180+
},
198181
],
199182
options: {
200183
doNotFollow: {
201-
path: 'node_modules'
184+
path: "node_modules",
202185
},
203186
tsConfig: {
204-
fileName: 'tsconfig.app.json'
187+
fileName: "tsconfig.app.json",
205188
},
206189
enhancedResolveOptions: {
207190
exportsFields: ["exports"],
@@ -210,15 +193,15 @@ module.exports = {
210193
},
211194
reporterOptions: {
212195
dot: {
213-
collapsePattern: 'node_modules/(@[^/]+/[^/]+|[^/]+)',
196+
collapsePattern: "node_modules/(@[^/]+/[^/]+|[^/]+)",
214197
},
215198
archi: {
216-
collapsePattern: '^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)',
199+
collapsePattern: "^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)",
217200
},
218-
"text": {
219-
"highlightFocused": true
201+
text: {
202+
highlightFocused: true,
220203
},
221-
}
222-
}
204+
},
205+
},
223206
};
224207
// generated: [email protected] on 2024-01-18T18:07:53.520Z

.dependency-graph.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
extends: "./.dependency-cruiser.cjs",
44
options: {
55
exclude: {
6-
dynamic: true
7-
}
8-
}
6+
dynamic: true,
7+
},
8+
},
99
};

.github/workflows/theme-ci.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
outputs:
3939
artifactUrl: '${{ steps.artifactUrl.outputs.download_url }}'
4040
jira-keys: ${{ steps.jira_keys.outputs.jira-keys }}
41+
branchName: ${{ steps.branch_name.outputs.branchName }}
4142

4243
steps:
4344

@@ -230,18 +231,35 @@ jobs:
230231
client-id: '${{ secrets.JIRA_USER }}'
231232
client-secret: '${{ secrets.JIRA_TOKEN }}'
232233

234+
- name: Set branch name value
235+
if: ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push')) ||
236+
(github.event_name == 'workflow_dispatch') || ((github.base_ref == 'dev') && (github.event_name == 'pull_request')) }}
237+
id: branch_name
238+
shell: pwsh
239+
env:
240+
EVENT_NAME: ${{ github.event_name }}
241+
HEAD_REF: ${{ github.head_ref }}
242+
REF_NAME: ${{ github.ref_name }}
243+
run: |
244+
if ($env:EVENT_NAME -eq 'pull_request'){
245+
$branchName = $env:HEAD_REF
246+
} else {
247+
$branchName = $env:REF_NAME
248+
}
249+
Add-Content -Path $env:GITHUB_OUTPUT -Value "branchName=$branchName"
233250
234251
ui-e2e-auto-tests:
235252
needs: 'ci'
236253
if: ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push')) ||
237254
(github.event_name == 'workflow_dispatch') || (github.base_ref == 'dev') && (github.event_name == 'pull_request') }}
238-
uses: VirtoCommerce/.github/.github/workflows/[email protected].18
255+
uses: VirtoCommerce/.github/.github/workflows/[email protected].22
239256
with:
240257
installModules: 'false'
241-
installCustomModule: 'true'
258+
installCustomModule: 'false'
242259
runTests: 'true'
243260
vctestingRepoBranch: 'dev'
244-
frontendZipUrl: ${{ needs.ci.outputs.artifactUrl }}
261+
frontendZipUrl: '${{ needs.ci.outputs.artifactUrl }}'
262+
customPackagesJsonUrl: 'https://github.com/${{ github.repository }}/raw/${{ needs.ci.outputs.branchName }}/backend-packages.json'
245263
secrets:
246264
envPAT: ${{ secrets.REPO_TOKEN }}
247265
testSecretEnvFile: ${{ secrets.VC_TESTING_MODULE_ENV_FILE }}
@@ -251,7 +269,7 @@ jobs:
251269
if: ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push')) ||
252270
(github.base_ref == 'dev') && (github.event_name == 'pull_request') ||
253271
(github.event_name == 'workflow_dispatch') }}
254-
uses: VirtoCommerce/.github/.github/workflows/[email protected].17
272+
uses: VirtoCommerce/.github/.github/workflows/[email protected].22
255273
with:
256274
installModules: 'true'
257275
installCustomModule: 'false'

0 commit comments

Comments
 (0)