diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml index e5c5d188e..f4e780d6e 100644 --- a/.github/workflows/backend-tests.yml +++ b/.github/workflows/backend-tests.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - node: [1.0.3, canary] + node: [1.0.23, canary] steps: - name: Checkout repository @@ -51,7 +51,7 @@ jobs: strategy: fail-fast: false matrix: - node: [1.0.3, canary] + node: [1.0.23, canary] steps: - name: Checkout repository diff --git a/.github/workflows/frontend-admin-tests.yml b/.github/workflows/frontend-admin-tests.yml index 5f39bdb9d..7aa31a397 100644 --- a/.github/workflows/frontend-admin-tests.yml +++ b/.github/workflows/frontend-admin-tests.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - node: [1.0.3, canary] + node: [1.0.23, canary] steps: - diff --git a/.github/workflows/upgrade-from-latest-release.yml b/.github/workflows/upgrade-from-latest-release.yml index bf84c1272..2e4af4282 100644 --- a/.github/workflows/upgrade-from-latest-release.yml +++ b/.github/workflows/upgrade-from-latest-release.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - node: [1.0.3, canary] + node: [1.0.23, canary] steps: - name: Check out latest release diff --git a/src/bun.lockb b/src/bun.lockb index 76fca1e23..76f361b11 100755 Binary files a/src/bun.lockb and b/src/bun.lockb differ diff --git a/src/node/utils/Minify.js b/src/node/utils/Minify.js index 2e8a2d960..25a45f1b6 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -25,11 +25,11 @@ const settings = require('./Settings'); const fs = require('fs').promises; const path = require('path'); const plugins = require('../../static/js/pluginfw/plugin_defs'); -const RequireKernel = require('etherpad-require-kernel'); const mime = require('mime-types'); const Threads = require('threads'); const log4js = require('log4js'); const sanitizePathname = require('./sanitizePathname'); +const pathutil = require("path"); const logger = log4js.getLogger('Minify'); @@ -267,7 +267,16 @@ const lastModifiedDateOfEverything = async () => { // This should be provided by the module, but until then, just use startup // time. const _requireLastModified = new Date(); -const requireDefinition = () => `var require = ${RequireKernel.kernelSource};\n`; +const requireDefinition = () => { + const pathutil = require('path'); + const kernelPath = pathutil.join(__dirname, 'kernel.js'); + const fs = require('fs'); + + const kernel = fs.readFileSync(kernelPath, 'utf8'); + const instruction = `var require = ${kernel};\n`; + console.log(instruction) + return instruction +} const getFileCompressed = async (filename, contentType) => { let content = await getFile(filename);