Skip to content

Commit

Permalink
fix: replace @doc-tools/[email protected] with @diplodoc/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
rusandorx committed Nov 9, 2023
1 parent 903d2dc commit 565e390
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
8 changes: 1 addition & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/yfm/YfmTabs/YfmTabs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
7 changes: 5 additions & 2 deletions tests/esbuild-test/esbuild-tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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 = {
Expand All @@ -32,14 +33,16 @@ const esbuildOptions = {
'.js': '.mjs',
},
plugins: [sassPlugin()],
platform: 'browser',
alias: ['fs', 'path', 'stream'].reduce((acc, name) => ({...acc, [name]: paths.aliases}), {}),
};

esbuild
.build({...esbuildOptions, entryPoints: [paths.esbuildToTest]})
.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(() => {
Expand Down
1 change: 1 addition & 0 deletions tests/esbuild-test/node-module-alias-fallback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default null;

0 comments on commit 565e390

Please sign in to comment.