Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dev-overlay): Code view breaking if the file extension was mjs or cjs #1368

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

gabrielmfern
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • infrastructure changes
  • Other... Please describe:

What is the current behavior?

If a library used plain MJS for their code, or just plain CJS it ended up being
that the code view in the development overlay would not recognize the file type because
Shiki expects mjs and cjs to be passed into it as JavaScript.

What is the new behavior?

Before actually passing in the language to the highlighter it checks if the file extension is
mjs or cjs and then assumes the language is js instead.

Copy link

changeset-bot bot commented Mar 7, 2024

🦋 Changeset detected

Latest commit: 6e1fd48

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ryansolid ryansolid changed the base branch from main to next March 7, 2024 23:23
@ryansolid
Copy link
Member

Thank you

@ryansolid ryansolid merged commit 32fc1f3 into solidjs:next Mar 8, 2024
1 check passed
ryansolid added a commit that referenced this pull request Mar 8, 2024
* transparent errors and support http status forwarding in server fns

* fix FS router circular dep by moving import

* update config to anticipate Vite updates, clearer experimental features, routesDir

* feat: implement getServerFunctionMeta

Refs: nksaraf/vinxi#51

* add serverFunctionMeta

* update Vinxi and Solid Router

* fix #1366 islands mode reference

* Update middleware.mdx (#1367)

See https://github.com/solidjs/solid-start/blob/main/packages/start/config/index.d.ts#L11

* fix types for latest updates

* don't import app on server for SSR false when SingleFlight false

* fix(dev-overlay): Code view breaking if the file extension was mjs or cjs (#1368)

* fix(dev-overlay): Code view breaking if the file extension was mjs or cjs

* chore: add missing changeset

* add `.` notation to escape layouts in FS routes

* add back different content type parsing in case middleware etc..

* remove support for event symbol autoforwarding

* update docs

* fix: script invocation error for "create-solid@latest" (#1369)

* More docs updates

* remove solid-start-mdx from changeset

* revert vite alignment until we know more, add server option to types

---------

Co-authored-by: Katja Lutz <mail@katjalutz.ch>
Co-authored-by: Feynman Liang <feynman.liang@gmail.com>
Co-authored-by: Gabriel Miranda <gabrielmfern@outlook.com>
Co-authored-by: Arunava Ghosh <arnvgh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants