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

Detect old sbt version; plus some maintenance #18

Merged
merged 3 commits into from
Nov 8, 2023
Merged

Conversation

raquo
Copy link
Contributor

@raquo raquo commented Nov 7, 2023

Primarily this is a fix for #17. I tested on MacOS, with sbt 1.6.1, 1.3.3, 1.2.0 and 0.13.18 downloaded from https://www.scala-sbt.org/download.html, and it's working as intended, detecting the error in 1.2.0 and 0.13.18 and printing instructions to fix it:


> [email protected] dev
> vite

[info] welcome to sbt 1.9.7 (Eclipse Adoptium Java 17.0.8.1)
[info] loading settings for project global-plugins from build.sbt,idea.sbt ...
[info] loading global plugins from /Users/raquo/.sbt/1.0/plugins
[info] loading settings for project root from build.sbt,metals.sbt,plugins.sbt ...
[info] loading project definition from /Users/raquo/code/scala/demo/project
[info] loading settings for project root from build.sbt ...
[info] set current project to Laminar Demo (in build file:/Users/raquo/code/scala/demo/)
[error] Expected symbol
[error] Not a valid command: --
[error] Expected 'debug'
[error] Expected 'info'
[error] Expected 'warn'
[error] Expected 'error'
[error] Expected 'addPluginSbtFile'
[error] --batch
[error]   ^
error when starting dev server:
Error: sbt invocation for Scala.js compilation failed with exit code 1.
Cause: Your sbt launcher script version is too old (<1.3.3).
Fix: Re-install the latest version of sbt launcher script from https://www.scala-sbt.org/
    at ChildProcess.<anonymous> (file:///Users/raquo/code/js/vite-plugin-scalajs/dist/index.js:29:24)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:513:28)
    at Pipe.<anonymous> (node:net:313:12)

I ran it on my laminar-demo project, everything seems fine. Tests pass.

Let me know if you want the error reworded or something.

I also made the following rather trivial changes in separate commits, but let me know if you want separate PRs for them.


Added common IDE and OS files to .gitignore.


Ran npm audit fix because it was reporting vulnerabilities in transient dependencies. It just updated some versions in package-lock.json, I skimmed through the changes, and I don't see anything controversial in there.

# npm audit report

get-func-name  <2.0.1
Severity: high
Chaijs/get-func-name vulnerable to ReDoS - https://github.com/advisories/GHSA-4q6p-r6v2-jvc5
fix available via `npm audit fix`
node_modules/get-func-name

postcss  <8.4.31
Severity: moderate
PostCSS line return parsing error - https://github.com/advisories/GHSA-7fh5-64p2-3v2j
fix available via `npm audit fix`
node_modules/postcss

vite  4.1.0 - 4.1.4
Severity: high
Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//) - https://github.com/advisories/GHSA-353f-5xf4-qw67
fix available via `npm audit fix`
node_modules/vite

3 vulnerabilities (1 moderate, 2 high)

To address all issues, run:
  npm audit fix

Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

Thanks :)

@sjrd sjrd merged commit c5ac901 into scala-js:main Nov 8, 2023
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