Remove hard dependency on Jason

Open
#83 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
elixir
Domain
backend

Research direction

Start with the Jason call in lib/esbuild/npm_registry.ex identified in the issue, then read how Phoenix and LiveView select a JSON library via :json_library. Decide whether to support configurable JSON modules with an optional Jason dependency or require Elixir 1.18+ and remove Jason. Done means esbuild handles JSON through the chosen approach and Phoenix apps can be generated without an unconditional Jason dependency.

Written by the indexing model from the issue text.

Description

Support custom JSON module implementation via config :json_library as in Phoenix and LiveView, make the :jason dependency optional.
Alternatively, require Elixir 1.18+ and drop the dependency on Jason entirely.

See https://github.com/phoenixframework/phoenix/pull/6815.

This would enable future Phoenix apps to be generated without depending on Jason.

There is only a single call to Jason in the entire code base:

https://github.com/phoenixframework/esbuild/blob/86f43046c069df68702082f8376be3be38e89652/lib/esbuild/npm_registry.ex#L47

Dominant language
Elixir
Stars
276
Forks
42
Avg merge
1m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from phoenixframework/esbuild

All issues in phoenixframework/esbuild

Similar issues

More Elixir issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.