diff --git a/CHANGELOG.md b/CHANGELOG.md index f31f546..69b7ff8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog][keepachangelog], and this project adheres to [Semantic Versioning][semver]. +## 1.1.6 - 2024-01-04 + +### Fixed + +- AGLint module import problem: [#113] + ## 1.1.5 - 2023-11-10 ### Added @@ -347,6 +353,7 @@ The format is based on [Keep a Changelog][keepachangelog], and this project adhe [#105]: https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/105 [#107]: https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/107 [#108]: https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/108 +[#113]: https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/113 [#114]: https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/114 [#115]: https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/115 [#119]: https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/119 diff --git a/package.json b/package.json index add37d7..5d9a5a3 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "adblock", "displayName": "Adblock/AdGuard/uBlock filters grammar", "description": "VS code extension that adds support for ad blocking rules syntax.", - "version": "1.1.5", + "version": "1.1.6", "publisher": "adguard", "icon": "icons/aglint_128x128.png", "main": "./client/out/extension", diff --git a/server/src/server.ts b/server/src/server.ts index 4fd15e8..83d3464 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -201,6 +201,11 @@ async function loadAglintModule( // Import corresponding AGLint module AGLintModule = await import(externalAglintPath || BUNDLED_AGLINT_PATH); + // Module may have a default export + if ('default' in AGLintModule) { + AGLintModule = AGLintModule.default as typeof AGLint; + } + // TODO: Another way to import the module, since we use CJS bundles // eslint-disable-next-line import/no-dynamic-require, global-require // AGLintModule = require(externalAglintPath || bundledAglintPath);