getappmap / getappmap/appmap-js

Packaging issue with dom-to-svg, module, typescript, and webpack

Open
#1,000 3 comments 0 reactions 1 assignee View on GitHub

@ahtrotta is already working on this.

Since Feb 9, 2023.

sequence diagrams
Dominant language
TypeScript
Stars
53
Forks
18
Avg merge
3d 18h
Merged PRs (30d)
8

Description

From @kgilpin :

appmap-js components test is breaking on my import of dom-to-svg, does anyone know how to fix this?

FAIL  tests/unit/VsCodeExtension.spec.js
  ● Test suite failed to run

    /Users/kgilpin/source/appland/appmap-js/node_modules/dom-to-svg/lib/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import * as postcss from 'postcss';
                                                                                             ^^^^^^

    SyntaxError: Cannot use import statement outside a module

       5 | <script>
       6 | import assert from 'assert';
    >  7 | import { elementToSVG, inlineResources } from 'dom-to-svg';
         | ^
       8 |
       9 | export default {
      10 |   name: 'v-download-sequence-diagram',

      at ScriptTransformer._transformAndBuildScript (../../node_modules/@vue/cli-plugin-unit-jest/node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
      at src/components/sequence/DownloadSequenceDiagram.vue:7:1
      at Object.<anonymous> (src/components/sequence/DownloadSequenceDiagram.vue:46:3)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.