Skip to content

Commit 94d1f7b

Browse files
committed
AG-45259 Rework project structure
Squashed commit of the following: commit 599a7dc Merge: 08e052e 622920e Author: scripthunter7 <d.tota@adguard.com> Date: Fri Dec 12 12:01:03 2025 +0100 Merge branch 'master' into fix/AG-45259-1 commit 08e052e Author: scripthunter7 <d.tota@adguard.com> Date: Fri Dec 12 10:00:27 2025 +0100 Add version comparison links to CHANGELOG.md and set 2.1.0 release date - Set release date for version 2.1.0 to 2025-12-15 - Add GitHub comparison link for version 2.1.0 (2.0.4...2.1.0) - Add GitHub comparison link for version 2.0.4 (2.0.3...2.0.4) commit 6fd7071 Author: scripthunter7 <d.tota@adguard.com> Date: Fri Dec 12 09:57:33 2025 +0100 Quote adg-docker requirement values in Bamboo specifications - Change adg-docker requirement from unquoted true to quoted 'true' - Apply changes to build.yaml, build-prerelease.yaml, and increment.yaml specifications commit 0ee3aae Author: Slava Leleka <v.leleka@adguard.com> Date: Fri Dec 12 11:55:53 2025 +0300 Applied suggestion commit 8824e48 Author: scripthunter7 <d.tota@adguard.com> Date: Thu Dec 11 16:10:03 2025 +0100 Remove redundant constants test file from client package commit 4b16db9 Author: scripthunter7 <d.tota@adguard.com> Date: Thu Dec 11 14:08:00 2025 +0100 Update version to 2.1.0 and document odd/even pre-release versioning scheme - Bump version from 2.0.4 to 2.1.0 in package.json - Add 2.1.0 changelog entry with internal improvements note - Add versioning policy section to CONTRIBUTING.md documenting odd/even scheme for pre-releases - Explain VS Code Marketplace limitation that prevents using pre-release tags like -alpha or -beta - Document version progression example: 2.0.0 → 2.1.0 (pre-release) → 2.1.1 → 2.2.0 (stable) - Add references to commit 26ae9b3 Author: scripthunter7 <d.tota@adguard.com> Date: Thu Dec 11 13:51:03 2025 +0100 Add --no-color flag to all package test commands in Bamboo test workflow - Add --no-color flag to test commands for Shared, Syntaxes, Client, and Server packages - Improve test output readability in Bamboo CI environment by disabling color codes commit 8a4f959 Author: scripthunter7 <d.tota@adguard.com> Date: Thu Dec 11 13:44:55 2025 +0100 Normalize job name to use 'and' instead of ampersand in Bamboo test workflow - Change "Build & Package" to "Build and Package" in stage definition and job name - Apply consistent naming convention across Bamboo specifications commit 4a2e3f5 Author: scripthunter7 <d.tota@adguard.com> Date: Thu Dec 11 13:44:00 2025 +0100 Refactor Bamboo test workflow to run package-specific tests in parallel stages - Split monolithic Build job into 5 separate jobs: Test Shared, Test Syntaxes, Test Client, Test Server, and Build & Package - Organize jobs into 3 stages based on package dependencies: Stage 1 (Shared, Syntaxes), Stage 2 (Client, Server), Stage 3 (Build & Package) - Add package-specific test commands for each workspace package (type checking, linting, unit tests) - Extract common configuration using YAML anchors for docker commit 6b0da21 Author: scripthunter7 <d.tota@adguard.com> Date: Thu Dec 11 13:29:09 2025 +0100 Update cleanup script calls to use comma-separated artifact list instead of space-separated arguments - Change cleanup.sh invocation from space-separated to comma-separated artifact list - Apply changes to build.yaml, build-prerelease.yaml, and test.yaml specifications commit 7409ba6 Author: scripthunter7 <d.tota@adguard.com> Date: Thu Dec 11 13:25:19 2025 +0100 Add adblock.plist artifact to test workflows and update artifact configuration - Add syntaxes/out/adblock.plist to GitHub Actions artifact upload - Rename GitHub Actions artifact from vscode-adblock-vsix to vscode-adblock-build - Update Bamboo cleanup script to preserve adblock.plist artifact - Split Bamboo artifacts into separate vscode-adblock.vsix and adblock.plist entries - Set both Bamboo artifacts as required and shared - Add location property to Bamboo artifact definitions commit 0fdc1d3 Author: scripthunter7 <d.tota@adguard.com> Date: Thu Dec 11 13:21:41 2025 +0100 Add extension build and packaging steps to test workflows - Add build and package steps to GitHub Actions check.yml workflow - Add VSIX artifact upload to GitHub Actions with 30-day retention - Add build and package steps to Bamboo test.yaml specification - Add VSIX file tree listing to Bamboo test workflow - Configure cleanup script to preserve out/vscode-adblock.vsix artifact - Add vscode-adblock.vsix as shared artifact in Bamboo test spec commit e45e6ef Merge: f184f78 7b30ebe Author: scripthunter7 <d.tota@adguard.com> Date: Thu Dec 11 13:15:09 2025 +0100 Merge branch 'master' into fix/AG-45259-1 commit f184f78 Merge: 387f3ad fc8d0eb Author: scripthunter7 <d.tota@adguard.com> Date: Wed Dec 10 17:40:18 2025 +0100 Merge branch 'master' into fix/AG-45259-1 commit 387f3ad Author: scripthunter7 <d.tota@adguard.com> Date: Wed Dec 10 12:39:12 2025 +0100 Normalize line endings to LF across all test files and configuration files - Convert CRLF to LF line endings in .eslintignore - Normalize line endings in all AGLint test files (.aglintignore, .aglintrc.yml, .txt files) - Update line endings in multi-root workspace configuration files - Add missing final newlines to custom-config files commit 3fd0ba2 Author: scripthunter7 <d.tota@adguard.com> Date: Wed Dec 10 12:37:55 2025 +0100 Add EditorConfig file and normalize whitespace/formatting across all configuration files - Add .editorconfig with LF line endings, UTF-8 charset, and 2-space indentation for JSON files - Add editorconfig.editorconfig to recommended VSCode extensions - Normalize indentation in all tsconfig.json files (replace tabs with spaces) - Remove trailing commas from JSON arrays - Add missing final newlines to configuration files - Standardize array formatting to single-line where appropriate commit d5d9c8d Merge: da10f55 885667f Author: scripthunter7 <d.tota@adguard.com> Date: Wed Dec 10 12:28:53 2025 +0100 Merge branch 'master' into fix/AG-45259-1 commit da10f55 Author: scripthunter7 <d.tota@adguard.com> Date: Tue Dec 9 20:50:16 2025 +0100 Refactor release workflow to use changelog-tools and conditional VSIX packaging - Move VSIX packaging after changelog extraction and variable setup - Add conditional packaging based on IS_PRERELEASE flag (package:pre vs package) - Replace npx changelog-tools with pnpm exec changelog-tools extract command - Update version extraction to use --json flag with jq for proper parsing - Change changelog output from ./out/TEMP_CHANGES.md to ./EXTRACTED_CHANGES.md - Remove build.txt creation step (no longer needed) commit 6734747 Author: scripthunter7 <d.tota@adguard.com> Date: Tue Dec 9 20:10:14 2025 +0100 Add VSIX file tree listing to build and prerelease pipelines - Add `pnpm exec vsce ls --tree` command to both build.yaml and build-prerelease.yaml - Display packaged file tree after VSIX creation for build verification - Insert command between package step and build.txt creation commit d1801f4 Author: scripthunter7 <d.tota@adguard.com> Date: Tue Dec 9 20:04:06 2025 +0100 Update workspace dependencies: @types/semver, chokidar, husky, semver, tsx, valibot, vscode-textmate, and yaml - Update @types/semver from ^7.5.0 to ^7.7.1 - Update chokidar from ^4.0.3 to ^5.0.0 - Update husky from ^9.0.1 to ^9.1.7 - Update semver from ^7.5.4 to ^7.7.3 - Update tsx from ^4.7.0 to ^4.21.0 - Update valibot from ^1.1.0 to ^1.2.0 - Update vscode-textmate from ^9.2.0 to ^9.3.0 - Update yaml from ^2.8.1 to ^2.8.2 - Update transitive dependencies including ansi-escapes, brace-expansion, glob ... and 50 more commits
1 parent 622920e commit 94d1f7b

138 files changed

Lines changed: 10530 additions & 5592 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
8+
[*.json]
9+
indent_style = space
10+
indent_size = 2

.eslintignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
node_modules
2-
out
1+
node_modules
2+
out

.eslintrc.cjs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const IMPORT_PLUGIN_RULES = {
118118
const JSDOC_PLUGIN_RULES = {
119119
// Types are described in TypeScript
120120
'jsdoc/require-param-type': 'off',
121+
'jsdoc/require-throws-type': 'off',
121122
'jsdoc/no-undefined-types': 'off',
122123
'jsdoc/require-returns-type': 'off',
123124

@@ -265,10 +266,6 @@ function mergeRules(...ruleSets) {
265266
module.exports = {
266267
root: true,
267268
parser: '@typescript-eslint/parser',
268-
parserOptions: {
269-
tsconfigRootDir: path.join(__dirname),
270-
project: 'tsconfig.eslint.json',
271-
},
272269
plugins: [
273270
'import',
274271
'import-newlines',
@@ -285,7 +282,7 @@ module.exports = {
285282
'plugin:n/recommended',
286283
],
287284
ignorePatterns: [
288-
'dist',
285+
'out',
289286
'coverage',
290287
],
291288
settings: {

.github/workflows/check.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,36 @@ jobs:
3838
- name: List files
3939
run: ls -alt
4040

41+
- name: Build shared library
42+
run: pnpm --filter @vscode-adblock-syntax/shared build
43+
4144
- name: Check TypeScript types
4245
run: pnpm test:compile
4346

4447
- name: Run markdownlint
4548
run: pnpm lint:md
4649

4750
- name: Run ESLint
48-
run: pnpm lint:ts
51+
run: pnpm lint:code
4952

50-
- name: Run Jest tests
53+
- name: Run Vitest tests
5154
run: pnpm test
5255

56+
- name: Build extension
57+
run: pnpm build
58+
59+
- name: Package extension
60+
run: pnpm package
61+
62+
- name: Upload artifacts
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: vscode-adblock-build
66+
path: |
67+
out/vscode-adblock.vsix
68+
syntaxes/out/adblock.plist
69+
retention-days: 30
70+
5371
notify:
5472
name: Send Slack notification on failure
5573
needs: check_code

.husky/install.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// See: https://typicode.github.io/husky/how-to.html#ci-server-and-docker
2+
import ci from 'ci-info';
3+
4+
// Do not initialize Husky in CI environments.
5+
if (ci.isCI) {
6+
console.log('Skipping Husky initialization, because we detected a CI environment:', ci.name);
7+
process.exit(0);
8+
}
9+
10+
// Initialize Husky programmatically.
11+
const husky = (await import('husky')).default;
12+
console.log(husky());

.husky/pre-commit

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
pnpm test:compile
2-
pnpm lint:staged
3-
pnpm test
1+
# Exit immediately if a command fails
2+
set -e
43

4+
lint-staged
5+
6+
# Corepack automatically adds a "packageManager" field to package.json.
7+
# We don't want to commit this field, so we remove it from the staged version
8+
# while keeping it in the working directory for local development.
59
if git diff --cached --name-only | grep -q "package.json"; then
610
echo "package.json is being committed. Checking if packageManager field is present..."
711

.lintstagedrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.lintstagedrc.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Lint-staged configuration for the monorepo root.
3+
*
4+
* Delegates to workspace-level configs for package-specific linting with
5+
* type checking (tsc-files) and related tests (vitest related).
6+
*
7+
* @type {import('lint-staged').Config}
8+
*/
9+
10+
module.exports = {
11+
// Root markdown files
12+
'*.md': 'markdownlint',
13+
14+
// Root-level tools and scripts
15+
'tools/**/*.{ts,js,cjs,mjs}': 'eslint --cache',
16+
17+
// Delegate to workspace configs (they have tsc-files + vitest related)
18+
'client/**/*.{ts,js,md}': () => 'pnpm --filter @vscode-adblock-syntax/client exec lint-staged',
19+
'server/**/*.{ts,js,md}': () => 'pnpm --filter @vscode-adblock-syntax/server exec lint-staged',
20+
'shared/**/*.{ts,js,md}': () => 'pnpm --filter @vscode-adblock-syntax/shared exec lint-staged',
21+
'syntaxes/**/*.{ts,js,md,yaml-tmlanguage}': () => 'pnpm --filter @vscode-adblock-syntax/syntaxes exec lint-staged',
22+
};

.markdownlint.json

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,37 @@
11
{
2-
"ul-indent": { "indent": 4 },
2+
"ul-indent": {
3+
"indent": 4
4+
},
35
"line-length": {
46
"stern": true,
57
"line_length": 120
68
},
7-
"no-multiple-blanks": { "maximum": 2 },
8-
"no-inline-html": { "allowed_elements": ["a", "details", "summary", "img", "pre"]},
9-
"no-duplicate-heading": { "siblings_only": true },
9+
"no-multiple-blanks": {
10+
"maximum": 2
11+
},
12+
"no-inline-html": {
13+
"allowed_elements": [
14+
"a",
15+
"details",
16+
"summary",
17+
"img",
18+
"pre",
19+
"div",
20+
"p"
21+
]
22+
},
23+
"no-duplicate-heading": {
24+
"siblings_only": true
25+
},
1026
"no-blanks-blockquote": false,
1127
"no-bare-urls": false,
12-
"ul-style": { "style": "dash" },
13-
"blanks-around-fences": { "list_items": false },
14-
"emphasis-style": { "style": "asterisk" }
28+
"ul-style": {
29+
"style": "dash"
30+
},
31+
"blanks-around-fences": {
32+
"list_items": false
33+
},
34+
"emphasis-style": {
35+
"style": "asterisk"
36+
}
1537
}

.vscode/extensions.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
{
2-
"recommendations": [
3-
"connor4312.esbuild-problem-matchers",
4-
"dbaeumer.vscode-eslint"
5-
]
6-
}
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"davidanson.vscode-markdownlint",
5+
"vitest.explorer",
6+
"editorconfig.editorconfig"
7+
]
8+
}

0 commit comments

Comments
 (0)