Skip to content

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 v24
  • 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