diff --git a/package-lock.json b/package-lock.json index e0aa55d7..fbb76dcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,8 +33,7 @@ "prosemirror-utils": "1.0.0-0", "prosemirror-view": "1.30.0", "react-use": "^17.3.2", - "tslib": "^2.3.1", - "un": "0.0.0" + "tslib": "^2.3.1" }, "devDependencies": { "@diplodoc/transform": "4.2.1", @@ -24141,11 +24140,6 @@ "node": ">=0.8.0" } }, - "node_modules/un": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/un/-/un-0.0.0.tgz", - "integrity": "sha512-Ysrl5s9YnTl7hVDOK2l5h2dKDne+/Q9FDbV5Hb1Mub1W8svfaqZj1xp/7XkzswJwzKpntT+L/9uDGLfPVsnRVA==" - }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", diff --git a/package.json b/package.json index e8546ba1..a2399e97 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,7 @@ "prosemirror-utils": "1.0.0-0", "prosemirror-view": "1.30.0", "react-use": "^17.3.2", - "tslib": "^2.3.1", - "un": "0.0.0" + "tslib": "^2.3.1" }, "devDependencies": { "@diplodoc/transform": "4.2.1", diff --git a/src/extensions/yfm/YfmTabs/YfmTabs.test.ts b/src/extensions/yfm/YfmTabs/YfmTabs.test.ts index 06272216..a094ff4a 100644 --- a/src/extensions/yfm/YfmTabs/YfmTabs.test.ts +++ b/src/extensions/yfm/YfmTabs/YfmTabs.test.ts @@ -69,7 +69,7 @@ describe('YfmTabs extension', () => { role: 'tab', 'aria-controls': generatedId, 'aria-selected': 'true', - tabindex: '0', + tabindex: '-1', 'data-diplodoc-is-active': 'true', 'data-diplodoc-id': 'panel-title-1', 'data-diplodoc-key': 'panel%20title%201', @@ -83,7 +83,7 @@ describe('YfmTabs extension', () => { role: 'tab', 'aria-controls': generatedId, 'aria-selected': 'false', - tabindex: '-1', + tabindex: '0', 'data-diplodoc-is-active': 'false', 'data-diplodoc-id': 'panel-title-2', 'data-diplodoc-key': 'panel%20title%202', diff --git a/tests/esbuild-test/esbuild-tester.js b/tests/esbuild-test/esbuild-tester.js index 94f8f201..c4df83d0 100644 --- a/tests/esbuild-test/esbuild-tester.js +++ b/tests/esbuild-test/esbuild-tester.js @@ -6,7 +6,7 @@ const esbuild = require('esbuild'); const fs = require('fs'); -const fsPrmosises = require('fs/promises'); +const fsPromises = require('fs/promises'); const path = require('path'); const {sassPlugin} = require('esbuild-sass-plugin'); @@ -15,6 +15,7 @@ const paths = { tempTest: path.join(__dirname, './temp-test.mjs'), localBuild: path.join(__dirname, './build'), compiledEsBuildToTest: path.join(__dirname, './build/esbuild-to-test.mjs'), + aliases: path.join(__dirname, './node-module-alias-fallback.js'), }; const esbuildOptions = { @@ -32,6 +33,8 @@ const esbuildOptions = { '.js': '.mjs', }, plugins: [sassPlugin()], + platform: 'browser', + alias: ['fs', 'path', 'stream'].reduce((acc, name) => ({...acc, [name]: paths.aliases}), {}), }; esbuild @@ -39,7 +42,7 @@ esbuild .then(async () => { const allExports = (await import(paths.compiledEsBuildToTest)).default; // Make a file that exports everything from src - await fsPrmosises.writeFile(paths.tempTest, `import {${allExports}} from '../../src'`); + await fsPromises.writeFile(paths.tempTest, `import {${allExports}} from '../../src'`); await esbuild.build({...esbuildOptions, entryPoints: [paths.tempTest]}); }) .finally(() => { diff --git a/tests/esbuild-test/node-module-alias-fallback.js b/tests/esbuild-test/node-module-alias-fallback.js new file mode 100644 index 00000000..7646bbd1 --- /dev/null +++ b/tests/esbuild-test/node-module-alias-fallback.js @@ -0,0 +1 @@ +export default null;