Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: browserify/node-util
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e37ce41f4063bcd7bc27e01470d6654053bdcd14
Choose a base ref
...
head repository: browserify/node-util
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ef984721db7150f651800e051de4314c9517d42c
Choose a head ref
  • 7 commits
  • 4 files changed
  • 3 contributors

Commits on Mar 2, 2022

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    46e101e View commit details
  2. Update README.md

    link to webpack docs
    MatrixFrog authored Mar 2, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    zimme Simon Fridlund
    Copy the full SHA
    51d163f View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    zimme Simon Fridlund
    Copy the full SHA
    ad9dbe0 View commit details

Commits on Mar 27, 2022

  1. refactor: replace deprecated String.prototype.substr()

    .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
    
    Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
    CommanderRoot committed Mar 27, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    zimme Simon Fridlund
    Copy the full SHA
    073daed View commit details

Commits on May 18, 2022

  1. Merge pull request #71 from CommanderRoot/refactor/rm-deprecated-substr

    refactor: replace deprecated String.prototype.substr()
    goto-bus-stop authored May 18, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    zimme Simon Fridlund
    Copy the full SHA
    a292d8a View commit details

Commits on Oct 16, 2022

  1. Verified

    This commit was signed with the committer’s verified signature.
    zimme Simon Fridlund
    Copy the full SHA
    e84cfd5 View commit details
  2. 0.12.5

    goto-bus-stop committed Oct 16, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    zimme Simon Fridlund
    Copy the full SHA
    ef98472 View commit details
Showing with 9 additions and 5 deletions.
  1. +4 −0 CHANGELOG.md
  2. +1 −1 README.md
  3. +2 −2 package.json
  4. +2 −2 util.js
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](http://semver.org/).

## 0.12.5
* Move `safe-buffer` dependency to a dev-only dependency. ([@goto-bus-stop](https://github.com/goto-bus-stop) in [e84cfd5](https://github.com/browserify/node-util/commit/e84cfd5e4923631d012e578d7aa140412a475646))
* Document usage with webpack 5+. ([@MatrixFrog](https://github.com/MatrixFrog) in [#69](https://github.com/browserify/node-util/pull/69))

## 0.12.4
* Avoid SharedArrayBuffer until required. ([@snyamathi](https://github.com/snyamathi) in [#59](https://github.com/browserify/node-util/pull/59))

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ This implements the Node.js [`util`][util] module for environments that do not h

## Install

You usually do not have to install `util` yourself. If your code runs in Node.js, `util` is built in. If your code runs in the browser, bundlers like [browserify](https://github.com/browserify/browserify) or [webpack](https://github.com/webpack/webpack) also include the `util` module.
You usually do not have to install `util` yourself. If your code runs in Node.js, `util` is built in. If your code runs in the browser, bundlers like [browserify](https://github.com/browserify/browserify) or [webpack](https://github.com/webpack/webpack) (up to version 4 -- [see this documentation](https://webpack.js.org/configuration/resolve/#resolvefallback) for how to include polyfills like `util` in webpack 5+) also include the `util` module.

But if none of those apply, with npm do:

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "util",
"description": "Node.js's util module for all engines",
"version": "0.12.4",
"version": "0.12.5",
"author": {
"name": "Joyent",
"url": "http://www.joyent.com"
@@ -14,7 +14,6 @@
"is-arguments": "^1.0.4",
"is-generator-function": "^1.0.7",
"is-typed-array": "^1.1.3",
"safe-buffer": "^5.1.2",
"which-typed-array": "^1.1.2"
},
"devDependencies": {
@@ -24,6 +23,7 @@
"object.assign": "~4.1.0",
"object.entries": "^1.1.0",
"run-series": "~1.1.4",
"safe-buffer": "^5.1.2",
"tape": "~4.9.0"
},
"files": [
4 changes: 2 additions & 2 deletions util.js
Original file line number Diff line number Diff line change
@@ -410,7 +410,7 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
if (array) {
str = str.split('\n').map(function(line) {
return ' ' + line;
}).join('\n').substr(2);
}).join('\n').slice(2);
} else {
str = '\n' + str.split('\n').map(function(line) {
return ' ' + line;
@@ -427,7 +427,7 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
}
name = JSON.stringify('' + key);
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
name = name.substr(1, name.length - 2);
name = name.slice(1, -1);
name = ctx.stylize(name, 'name');
} else {
name = name.replace(/'/g, "\\'")