Shopify / Shopify/theme-tools

@shopify/liquid-html-parser package has no `.js.map` files

Open
#535 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
234
Forks
92
Avg merge
1d 3h
Merged PRs (30d)
6

Description

Describe the bug
@shopify/liquid-html-parser package has no /src folder and .js.map files. We can check that on npmjs.com (linked to package name above). This package is used in @shopify/theme-check-common package that is needed for .liquid files checking.
Naturally, missing .js.map files results in errors if you have source mapping for dependencies in your project. Errors like that:

WARNING in ./node_modules/@shopify/liquid-html-parser/dist/conditional-comment.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'X:\work\shop\shops\node_modules\@shopify\liquid-html-parser\dist\conditional-comment.js.map' file:
Error: ENOENT: no such file or directory, open 'X:\work\shop\shops\node_modules\@shopify\liquid-html-parser\dist\conditional-comment.js.map'

Expected behaviour
@shopify/liquid-html-parser package has /src folder and .js.map files and has no source map loading errors.

Actual behaviour
@shopify/liquid-html-parser package has no /src folder and .js.map files.
But tries to use sourceMappingURLs in the every .js files like in the screenshot:
Image

Debugging information

  • Lib Version - latest of @shopify/liquid-html-parser (v2.0.5)
  • Lib Version that uses liquid-html-parser - latest of @shopify/theme-check-common (v2.9.2)

Contributor guide

Open the contributing guide

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.

Research direction

Inspect the published @shopify/liquid-html-parser v2.0.5 package, focusing on its dist/*.js files, missing /src directory, and absent .js.map files. Compare the package contents and sourceMappingURL references with the expected npm artifact, then verify that consuming it through @shopify/theme-check-common v2.9.2 no longer produces source-map loading errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.