-
-
Notifications
You must be signed in to change notification settings - Fork 8
Upgrade deps 2026 1 #326
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
Upgrade deps 2026 1 #326
Changes from all commits
8e5f256
6965b0a
9978916
967207f
f83e049
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |||||||||||||||||||||||||||
| </p> | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # node-ray | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ### The official Node/JS & TypeScript integration for Ray - Understand and fix bugs faster. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| The package can be installed in any NodeJS, ES6+, or TypeScript application to send data to the [Ray app](https://myray.app). | ||||||||||||||||||||||||||||
|
|
@@ -41,13 +42,18 @@ or bun: | |||||||||||||||||||||||||||
| bun add node-ray | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Requirements | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - Node.js >= 20.19 | ||||||||||||||||||||||||||||
| - ESM-only (CommonJS is no longer supported; use v2.x for `require` support) | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Available environments | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| `node-ray` offers several options to allow you to use it in either NodeJS, Web-based TypeScript or Javascript projects, and browser environments. | ||||||||||||||||||||||||||||
| `node-ray` offers several options to allow you to use it in either NodeJS, Web-based TypeScript or JavaScript projects, and browser environments. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| >If you're using NextJs/React, take a look at [permafrost-dev/react-ray](https://github.com/permafrost-dev/react-ray). | ||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||
| >If you're using Vue, check out [permafrost-dev/vue-ray](https://github.com/permafrost-dev/vue-ray). | ||||||||||||||||||||||||||||
| > If you're using NextJs/React, take a look at [permafrost-dev/react-ray](https://github.com/permafrost-dev/react-ray). | ||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||
| > If you're using Vue, check out [permafrost-dev/vue-ray](https://github.com/permafrost-dev/vue-ray). | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
Comment on lines
+52
to
57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove trailing space in the blockquote to satisfy markdownlint. 📝 Suggested diff->
+>📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.20.0)[warning] 55-55: Trailing spaces (MD009, no-trailing-spaces) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| ### NodeJS | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -56,20 +62,16 @@ When using in a NodeJS environment (the default), import the package as you woul | |||||||||||||||||||||||||||
| ```js | ||||||||||||||||||||||||||||
| // es module import: | ||||||||||||||||||||||||||||
| import { ray } from 'node-ray'; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| // commonjs import: | ||||||||||||||||||||||||||||
| const ray = require('node-ray').ray; | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| `node-ray` is ESM-only. CommonJS `require` is not supported. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ### Browser bundle | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| When bundling scripts for use in a Browser environment _(i.e., using webpack or vite)_, import the `/web` export: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```js | ||||||||||||||||||||||||||||
| import { ray } from 'node-ray/web'; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| // or a commonjs import: | ||||||||||||||||||||||||||||
| const { ray } = require('node-ray/web'); | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ### Browser standalone | ||||||||||||||||||||||||||||
|
|
@@ -104,7 +106,7 @@ As of version `2.0.0`, you no longer need to manually initialize the global `ray | |||||||||||||||||||||||||||
| To use `node-ray` with Laravel Mix, include the following in `resources/js/bootstrap.js`: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```js | ||||||||||||||||||||||||||||
| const { ray } = require('node-ray/web'); | ||||||||||||||||||||||||||||
| import { ray } from 'node-ray/web'; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| window.ray = ray; | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
@@ -130,9 +132,6 @@ Most of the API from the [original PHP package](https://github.com/spatie/ray) i | |||||||||||||||||||||||||||
| ```js | ||||||||||||||||||||||||||||
| // es module import: | ||||||||||||||||||||||||||||
| import { ray } from 'node-ray'; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| // commonjs import: | ||||||||||||||||||||||||||||
| const { ray } = require('node-ray'); | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| To modify the host or port: | ||||||||||||||||||||||||||||
|
|
@@ -175,7 +174,7 @@ ray().xml('<one>11</one>'); // previous call disabled sending data, XML not sent | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| _Note: This section only applies when using `node-ray` in the NodeJS environment, NOT a browser environment._ | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| `node-ray` will search for `ray.config.js`, which should be in the project's root directory. | ||||||||||||||||||||||||||||
| `node-ray` will search for `ray.config.js`, which should be in the project's root directory. The config file is ESM and should use `export default`. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Using a configuration file is optional, and the package will use the default settings if no configuration file is specified. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -184,7 +183,7 @@ _Example:_ | |||||||||||||||||||||||||||
| ```js | ||||||||||||||||||||||||||||
| // ray.config.js | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| module.exports = { | ||||||||||||||||||||||||||||
| export default { | ||||||||||||||||||||||||||||
| enable: true, | ||||||||||||||||||||||||||||
| host: 'localhost', | ||||||||||||||||||||||||||||
| port: 23517, | ||||||||||||||||||||||||||||
|
|
@@ -279,60 +278,60 @@ See [using the package](docs/usage.md). | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Reference | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| | Call | Description | | ||||||||||||||||||||||||||||
| | --- | --- | | ||||||||||||||||||||||||||||
| | `ray(variable)` | Display a string, array or object | | ||||||||||||||||||||||||||||
| | `ray(var1, var2, …)` | Ray accepts multiple arguments | | ||||||||||||||||||||||||||||
| | `ray().blue()` | Output in color. Use `green`, `orange`, `red`, `blue`,`purple` or `gray` | | ||||||||||||||||||||||||||||
| | `ray().caller()` | **Asynchronous.** Show the calling class and method | | ||||||||||||||||||||||||||||
| | `ray().chain(callback)` | Chain multiple Ray payloads and send them all at once. `callback: (ray: Ray) => void` | | ||||||||||||||||||||||||||||
| | `ray().clearScreen()` | Clear current screen | | ||||||||||||||||||||||||||||
| | `ray().clearAll()` | Clear current and all previous screens | | ||||||||||||||||||||||||||||
| | `ray().className(obj)` | Display the classname for an object | | ||||||||||||||||||||||||||||
| | `ray().confetti()` | Display Confetti in Ray | | ||||||||||||||||||||||||||||
| | `ray().count(name)` | Count how many times a piece of code is called, with optional name | | ||||||||||||||||||||||||||||
| | `ray().date(date, format)` | Display a formatted date, the timezone, and its timestamp | | ||||||||||||||||||||||||||||
| | `ray().die()` | Halt code execution - NodeJS only | | ||||||||||||||||||||||||||||
| | `ray().disable()` | Disable sending stuff to Ray | | ||||||||||||||||||||||||||||
| | `ray().disabled()` | Check if Ray is disabled | | ||||||||||||||||||||||||||||
| | `ray().enable()` | Enable sending stuff to Ray | | ||||||||||||||||||||||||||||
| | `ray().enabled()` | Check if Ray is enabled | | ||||||||||||||||||||||||||||
| | `ray().error(err)` | Display information about an Error/Exception | | ||||||||||||||||||||||||||||
| | `ray().event(name, data)` | Display information about an event with optional data | | ||||||||||||||||||||||||||||
| | `ray().exception(err)` | **Asynchronous.** Display extended information and stack trace for an Error/Exception | | ||||||||||||||||||||||||||||
| | `ray().file(filename)` | **NodeJS only.** Display contents of a file | | ||||||||||||||||||||||||||||
| | `ray().hide()` | Display something in Ray and make it collapse immediately | | ||||||||||||||||||||||||||||
| | `ray().hideApp()` | Programmatically hide the Ray app window | | ||||||||||||||||||||||||||||
| | `ray().html(string)` | Send HTML to Ray | | ||||||||||||||||||||||||||||
| | `ray().htmlMarkup(string)` | Display syntax-highlighted HTML code in Ray | | ||||||||||||||||||||||||||||
| | `ray().if(true, callback)` | Conditionally show things based on a truthy value or callable, optionally calling the callback with a `ray` argument | | ||||||||||||||||||||||||||||
| | `ray().image(url)` | Display an image in Ray | | ||||||||||||||||||||||||||||
| | `ray().interceptor()` | Access ConsoleInterceptor; call `.enable()` to show `console.log()` calls in Ray | | ||||||||||||||||||||||||||||
| | `ray().json([…])` | Send JSON to Ray | | ||||||||||||||||||||||||||||
| | `ray().label(string)` | Add a text label to the payload | | ||||||||||||||||||||||||||||
| | `ray().limit(N)` | **Asynchronous.** Limit the number of payloads that can be sent to Ray to N; used for debugging within loops | | ||||||||||||||||||||||||||||
| | `ray().macro(name, callable)` | Add a custom method to the Ray class. make sure not to use an arrow function if returning `this` | | ||||||||||||||||||||||||||||
| | `ray().measure(callable)` | Measure the performance of a callback function | | ||||||||||||||||||||||||||||
| | `ray().measure()` | Begin measuring the overall time and elapsed time since previous `measure()` call | | ||||||||||||||||||||||||||||
| | `ray().newScreen()` | Start a new screen | | ||||||||||||||||||||||||||||
| | `ray().newScreen('title')` | Start a new named screen | | ||||||||||||||||||||||||||||
| | `ray().nodeinfo()` | **NodeJS only.** Display statistics about node, such as the v8 version and memory usage | | ||||||||||||||||||||||||||||
| | `ray().notify(message)` | Display a notification | | ||||||||||||||||||||||||||||
| | `ray().once(arg1, …)` | **Asynchronous.** Only send a payload once when in a loop | | ||||||||||||||||||||||||||||
| | `ray().pass(variable)` | Display something in Ray and return the value instead of a Ray instance | | ||||||||||||||||||||||||||||
| | `ray().pause()` | Pause code execution within your code; must be called using `await` | | ||||||||||||||||||||||||||||
| | `ray().projectName(name)` | Change the active project name | | ||||||||||||||||||||||||||||
| | `ray().remove()` | Remove an item from Ray | | ||||||||||||||||||||||||||||
| | `ray().screenColor(color)` | Changes the screen color to the specified color | | ||||||||||||||||||||||||||||
| | `ray().separator()` | Display a separator | | ||||||||||||||||||||||||||||
| | `ray().showApp()` | Programmatically show the Ray app window | | ||||||||||||||||||||||||||||
| | `ray().small()` | Output text smaller or bigger. Use `large` or `small`| | ||||||||||||||||||||||||||||
| | `ray().stopTime(name)` | Removes a named stopwatch if specified, otherwise removes all stopwatches | | ||||||||||||||||||||||||||||
| | `ray().table(…)` | Display an array or an object formatted as a table; Objects and arrays are pretty-printed | | ||||||||||||||||||||||||||||
| | `ray().text(string)` | Display raw text in Ray while preserving whitespace formatting | | ||||||||||||||||||||||||||||
| | `ray().toJson(variable)` | Convert a variable using `JSON.stringify()` and display the result | | ||||||||||||||||||||||||||||
| | `ray().trace()` | Display a stack trace | | ||||||||||||||||||||||||||||
| | `ray().xml(string)` | Send XML to Ray | | ||||||||||||||||||||||||||||
| | Call | Description | | ||||||||||||||||||||||||||||
| | ----------------------------- | -------------------------------------------------------------------------------------------------------------------- | | ||||||||||||||||||||||||||||
| | `ray(variable)` | Display a string, array or object | | ||||||||||||||||||||||||||||
| | `ray(var1, var2, …)` | Ray accepts multiple arguments | | ||||||||||||||||||||||||||||
| | `ray().blue()` | Output in color. Use `green`, `orange`, `red`, `blue`,`purple` or `gray` | | ||||||||||||||||||||||||||||
| | `ray().caller()` | **Asynchronous.** Show the calling class and method | | ||||||||||||||||||||||||||||
| | `ray().chain(callback)` | Chain multiple Ray payloads and send them all at once. `callback: (ray: Ray) => void` | | ||||||||||||||||||||||||||||
| | `ray().clearScreen()` | Clear current screen | | ||||||||||||||||||||||||||||
| | `ray().clearAll()` | Clear current and all previous screens | | ||||||||||||||||||||||||||||
| | `ray().className(obj)` | Display the classname for an object | | ||||||||||||||||||||||||||||
| | `ray().confetti()` | Display Confetti in Ray | | ||||||||||||||||||||||||||||
| | `ray().count(name)` | Count how many times a piece of code is called, with optional name | | ||||||||||||||||||||||||||||
| | `ray().date(date, format)` | Display a formatted date, the timezone, and its timestamp | | ||||||||||||||||||||||||||||
| | `ray().die()` | Halt code execution - NodeJS only | | ||||||||||||||||||||||||||||
| | `ray().disable()` | Disable sending stuff to Ray | | ||||||||||||||||||||||||||||
| | `ray().disabled()` | Check if Ray is disabled | | ||||||||||||||||||||||||||||
| | `ray().enable()` | Enable sending stuff to Ray | | ||||||||||||||||||||||||||||
| | `ray().enabled()` | Check if Ray is enabled | | ||||||||||||||||||||||||||||
| | `ray().error(err)` | Display information about an Error/Exception | | ||||||||||||||||||||||||||||
| | `ray().event(name, data)` | Display information about an event with optional data | | ||||||||||||||||||||||||||||
| | `ray().exception(err)` | **Asynchronous.** Display extended information and stack trace for an Error/Exception | | ||||||||||||||||||||||||||||
| | `ray().file(filename)` | **NodeJS only.** Display contents of a file | | ||||||||||||||||||||||||||||
| | `ray().hide()` | Display something in Ray and make it collapse immediately | | ||||||||||||||||||||||||||||
| | `ray().hideApp()` | Programmatically hide the Ray app window | | ||||||||||||||||||||||||||||
| | `ray().html(string)` | Send HTML to Ray | | ||||||||||||||||||||||||||||
| | `ray().htmlMarkup(string)` | Display syntax-highlighted HTML code in Ray | | ||||||||||||||||||||||||||||
| | `ray().if(true, callback)` | Conditionally show things based on a truthy value or callable, optionally calling the callback with a `ray` argument | | ||||||||||||||||||||||||||||
| | `ray().image(url)` | Display an image in Ray | | ||||||||||||||||||||||||||||
| | `ray().interceptor()` | Access ConsoleInterceptor; call `.enable()` to show `console.log()` calls in Ray | | ||||||||||||||||||||||||||||
| | `ray().json([…])` | Send JSON to Ray | | ||||||||||||||||||||||||||||
| | `ray().label(string)` | Add a text label to the payload | | ||||||||||||||||||||||||||||
| | `ray().limit(N)` | **Asynchronous.** Limit the number of payloads that can be sent to Ray to N; used for debugging within loops | | ||||||||||||||||||||||||||||
| | `ray().macro(name, callable)` | Add a custom method to the Ray class. make sure not to use an arrow function if returning `this` | | ||||||||||||||||||||||||||||
| | `ray().measure(callable)` | Measure the performance of a callback function | | ||||||||||||||||||||||||||||
| | `ray().measure()` | Begin measuring the overall time and elapsed time since previous `measure()` call | | ||||||||||||||||||||||||||||
| | `ray().newScreen()` | Start a new screen | | ||||||||||||||||||||||||||||
| | `ray().newScreen('title')` | Start a new named screen | | ||||||||||||||||||||||||||||
| | `ray().nodeinfo()` | **NodeJS only.** Display statistics about node, such as the v8 version and memory usage | | ||||||||||||||||||||||||||||
| | `ray().notify(message)` | Display a notification | | ||||||||||||||||||||||||||||
| | `ray().once(arg1, …)` | **Asynchronous.** Only send a payload once when in a loop | | ||||||||||||||||||||||||||||
| | `ray().pass(variable)` | Display something in Ray and return the value instead of a Ray instance | | ||||||||||||||||||||||||||||
| | `ray().pause()` | Pause code execution within your code; must be called using `await` | | ||||||||||||||||||||||||||||
| | `ray().projectName(name)` | Change the active project name | | ||||||||||||||||||||||||||||
| | `ray().remove()` | Remove an item from Ray | | ||||||||||||||||||||||||||||
| | `ray().screenColor(color)` | Changes the screen color to the specified color | | ||||||||||||||||||||||||||||
| | `ray().separator()` | Display a separator | | ||||||||||||||||||||||||||||
| | `ray().showApp()` | Programmatically show the Ray app window | | ||||||||||||||||||||||||||||
| | `ray().small()` | Output text smaller or bigger. Use `large` or `small` | | ||||||||||||||||||||||||||||
| | `ray().stopTime(name)` | Removes a named stopwatch if specified, otherwise removes all stopwatches | | ||||||||||||||||||||||||||||
| | `ray().table(…)` | Display an array or an object formatted as a table; Objects and arrays are pretty-printed | | ||||||||||||||||||||||||||||
| | `ray().text(string)` | Display raw text in Ray while preserving whitespace formatting | | ||||||||||||||||||||||||||||
| | `ray().toJson(variable)` | Convert a variable using `JSON.stringify()` and display the result | | ||||||||||||||||||||||||||||
| | `ray().trace()` | Display a stack trace | | ||||||||||||||||||||||||||||
| | `ray().xml(string)` | Send XML to Ray | | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## FAQ | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Consider removing obsolete ignore entries.
Since
.eslintrc.cjswas removed in favor ofeslint.config.jsandbiome.jsonwas renamed tobiome.jsonc, the ignore entries for.eslintrc.js(line 14) andbiome.json(line 28) are now obsolete. While harmless, removing them would keep the file tidy.Also applies to: 28-28
🤖 Prompt for AI Agents