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

Version 3.0 #39

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Version 3.0 #39

wants to merge 9 commits into from

Conversation

Nixinova
Copy link
Owner

@Nixinova Nixinova commented Feb 20, 2025

Work is underway on Version 3.0 of LinguistJS!

See discussion #31 for a list of proposed features for v3.0's release.

Breaking changes

  • Changed manual file content API to be the use of an object as the first item
    • linguist(['filename'], {fileContent: ['abc'], ...opts})linguist({filename: 'abc'}, opts)
  • Removed type, parent and color keys from individual language results.
  • Removed analyse CLI arg alias.
  • Removed lines.code.
  • Output is now an ESModule and can no longer be require()'d
  • Bump minimum Node version to v22
  • Output is now in ES2023

New features

  • Added repositories output object, featuring all languages' metadata.
  • Added count property per language result.

Fixes

  • Fixed ReDoS vulnerabilities.

Blockers

Breaking change!
- Bump minimum Node version to v20
- Target ES2023
- Switch to ESModule output
- Upgrade all dependencies
@Nixinova Nixinova added node usage Related to Node usage in progress This is being worked on release This is a proposed release of LinguistJS labels Feb 20, 2025
Stores type, parent, and colour.
Fetch API has native support.
Doesn't work with new version of commander.
Using `import` logs a warning in Node v22. Import it manually by reading the JSON file to avoid this warning.
Return only total and content line counts.

Can't perform proper lines of code analysis with regex only: too complicated and inaccurate, and would not be performant to implement properly.
Make it more performant and accurate.
Manual file content is now done as just the first argument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress This is being worked on node usage Related to Node usage release This is a proposed release of LinguistJS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant