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

feat: add support for JSON files in editors #1502

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

codebytere
Copy link
Member

This PR adds support for JSON files. These can be used in Fiddle for data storage amongst other things - the impetus for this specifically is the ability to add manifest.json files for Chrome extensions.

@codebytere codebytere requested a review from a team as a code owner November 10, 2023 00:15
@coveralls
Copy link

coveralls commented Nov 10, 2023

Coverage Status

coverage: 87.23% (-0.03%) from 87.257%
when pulling e3b9d8d on support-json-files
into 41b0600 on main.

Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running this locally, I get package-lock.json when I start up with 27.0.0 selected. Probably because we pull the content from https://github.com/electron/electron-quick-start/tree/27-x-y and that has a package-lock.json.

@dsanders11
Copy link
Member

Minor, but while you can't add a new file called package.json, if you rename an existing file to package.json it just disappears.

@codebytere codebytere force-pushed the support-json-files branch 2 times, most recently from 2cb6c96 to ad5966a Compare November 10, 2023 06:16
Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Somewhat of a nit, but can you swap some of the hardcoded 'package.json' text with PACKAGE_NAME? It's nice to be consistent so searching finds all instances.

src/renderer/components/sidebar-file-tree.tsx Outdated Show resolved Hide resolved
src/renderer/editor-mosaic.ts Outdated Show resolved Hide resolved
tests/main/utils/read-fiddle-spec.ts Outdated Show resolved Hide resolved
@dsanders11 dsanders11 merged commit c6601d9 into main Nov 10, 2023
@dsanders11 dsanders11 deleted the support-json-files branch November 10, 2023 23:41
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.

3 participants