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: uuidjs/uuid
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4cf24c018cead5ebe48cb4da232b57a2345d9fb5
Choose a base ref
...
head repository: uuidjs/uuid
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ca1d39d58a6308d5311bcb356a931aa818ec0ded
Choose a head ref
  • 18 commits
  • 15 files changed
  • 7 contributors

Commits on Oct 31, 2022

  1. Copy the full SHA
    cc55459 View commit details
  2. test: remove @ctavan (temporarily)

    "Fund this project" isn't showing up in sidebar and I'm not sure why.  'Wondering if it's because ctavan hasn't set up his sponsor account yet?
    broofa authored Oct 31, 2022
    Copy the full SHA
    06c4094 View commit details
  3. Copy the full SHA
    d27dad1 View commit details

Commits on Dec 21, 2022

  1. docs: typo (#667)

    0xflotus authored Dec 21, 2022
    Copy the full SHA
    62ef29e View commit details

Commits on Jan 13, 2023

  1. Copy the full SHA
    e53793f View commit details

Commits on Jan 16, 2023

  1. Copy the full SHA
    eca69af View commit details

Commits on Feb 12, 2023

  1. Copy the full SHA
    aef75d7 View commit details

Commits on Mar 13, 2023

  1. Replace broken image in README file (#695)

    chore: fix broken readme and npm@9 build process
    
    * Fix broken image for RunMD
    * Update runmd package (fixes logo link)
    * Fix build script (npm bin -> npx)
    
    Co-authored-by: Robert Kieffer <robert@broofa.com>
    yonifra and broofa authored Mar 13, 2023
    Copy the full SHA
    a571c94 View commit details

Commits on Mar 14, 2023

  1. Copy the full SHA
    1ebda6c View commit details

Commits on Mar 21, 2023

  1. chore: upgrade and fix the stale-issues workflow (#699)

    This has been failing with the following error message for a while:
    
    ```
    The workflow is not valid. .github/workflows/stale-issues.yml (Line: 20,
    Col: 32): A sequence was not expected .github/workflows/stale-issues.yml
    (Line: 21, Col: 29): A sequence was not expected
    ```
    ctavan authored Mar 21, 2023
    Copy the full SHA
    8f028c4 View commit details

Commits on Mar 22, 2023

  1. Copy the full SHA
    e6b0c90 View commit details

Commits on Mar 23, 2023

  1. ci: run browser tests on pull_request_target (#703)

    pull_request_target allows runs to access the secret values. Since this adds an attack vector described here https://securitylab.github.com/research/github-actions-preventing-pwn-requests/, the extra condition to only run on the main repo push or if someone adds a safe to test label after reviewing the code is added.
    nschonni authored Mar 23, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    862562e View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    60ffc40 View commit details
  3. Copy the full SHA
    6eef540 View commit details

Commits on Apr 19, 2023

  1. Copy the full SHA
    4de23a6 View commit details

Commits on Sep 8, 2023

  1. Copy the full SHA
    462128b View commit details

Commits on Sep 11, 2023

  1. Copy the full SHA
    fc5d643 View commit details

Commits on Sep 12, 2023

  1. chore(release): 9.0.1

    ctavan committed Sep 12, 2023
    Copy the full SHA
    ca1d39d View commit details
Showing with 167 additions and 95 deletions.
  1. +1 −0 .github/FUNDING.yml
  2. +1 −0 .github/SECURITY.md
  3. +11 −8 .github/workflows/browser.yml
  4. +10 −14 .github/workflows/ci.yml
  5. +9 −7 .github/workflows/stale-issues.yml
  6. +6 −0 CHANGELOG.md
  7. +9 −5 README.md
  8. +5 −3 README_js.md
  9. +36 −9 bundlewatch.config.json
  10. +66 −32 package-lock.json
  11. +7 −3 package.json
  12. +4 −5 scripts/build.sh
  13. +1 −1 src/stringify.js
  14. +1 −1 test/unit/parse.test.js
  15. +0 −7 test/unit/rng.test.js
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [broofa, ctavan]
1 change: 1 addition & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
For issues related to `uuid` security please email the module maintainers. Their email addresses are available via `npm owner ls uuid`.
19 changes: 11 additions & 8 deletions .github/workflows/browser.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
name: Browser

on: [push]
on:
push:
pull_request_target:
types: [labeled]

jobs:
browser:

if: github.repository == 'uuidjs/uuid' && (contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push')
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 10
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: npm install
- run: npm ci
- name: Test Browser
run: npm run test:browser
env:
CI: true
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- run: npx bundlewatch --config bundlewatch.config.json
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
24 changes: 10 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -9,36 +9,32 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 18.x]
node-version: [12.x, 14.x, 16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Use Node.js 16.x to build
uses: actions/setup-node@v1
- name: Use Node.js 18.x to build
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- run: npm install
- run: npm run build
- run: rm -rf node_modules
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test
env:
CI: true
- run: npm run lint
if: matrix.node-version == '16.x'
if: matrix.node-version == '18.x'
- run: npm run docs:diff
if: matrix.node-version == '16.x'
- run: npm run bundlewatch
if: matrix.node-version == '16.x'
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
if: matrix.node-version == '18.x'
- run: npm run test:node
if: matrix.node-version >= '16.x'
if: matrix.node-version >= '18.x'
- run: npm run test:pack
if: matrix.node-version >= '16.x'
if: matrix.node-version >= '18.x'
16 changes: 9 additions & 7 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Close inactive issues
on:
schedule:
- cron: "45 2 * * *"
- cron: '45 2 * * *'

jobs:
close-issues:
@@ -10,13 +10,15 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
- uses: actions/stale@v7
with:
days-before-issue-stale: 90
close-issue-message: 'Closing issue due to 30 days since being marked as stale.'
days-before-issue-close: 30
stale-issue-label: "stale"
stale-issue-message: "Marking as stale due to 90 days with no activity."
close-issue-message: "Closing issue due to 30 days since being marked as stale."
days-before-pr-stale: -1
days-before-issue-stale: 90
days-before-pr-close: -1
days-before-pr-stale: -1
exempt-issue-labels: 'stale-exempt'
exempt-pr-labels: 'stale-exempt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'stale'
stale-issue-message: 'Marking as stale due to 90 days with no activity.'
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [9.0.1](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1) (2023-09-12)

### build

- Fix CI to work with Node.js 20.x

## [9.0.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05)

### ⚠ BREAKING CHANGES
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,22 +2,25 @@
-- This file is auto-generated from README_js.md. Changes should be made there.
-->


# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)

For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs

- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs
- **Cross-platform** - Support for ...
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
- Node 12, 14, 16, 18
- NodeJS 12+ ([LTS releases](https://github.com/nodejs/Release))
- Chrome, Safari, Firefox, Edge browsers
- Webpack and rollup.js module bundlers
- [React Native / Expo](#react-native--expo)
- **Secure** - Cryptographically-strong random values
- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
- **CLI** - Includes the [`uuid` command line](#command-line) utility

**Upgrading from `uuid@3`?** Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details.
> **Note** Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details.
> **Note** Only interested in creating a version 4 UUID? You might be able to use [`crypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library.
## Quickstart

@@ -138,7 +141,7 @@ Create an RFC version 1 (timestamp) UUID
| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) |
| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff |
| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) |
| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanseconds to add to `msecs`, should be 0-10,000) |
| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) |
| [`options.random`] | `Array` of 16 random bytes (0-255) |
| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |
| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
@@ -458,5 +461,6 @@ const uuid = require('uuid'); // <== REMOVED!

This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`.

----
Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](https://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd)
---

Markdown generated from [README_js.md](README_js.md) by <a href="https://github.com/broofa/runmd"><image height="12px" src="https://camo.githubusercontent.com/5c7c603cd1e6a43370b0a5063d457e0dabb74cf317adc7baba183acb686ee8d0/687474703a2f2f692e696d6775722e636f6d2f634a4b6f3662552e706e67" /></a>
8 changes: 5 additions & 3 deletions README_js.md
Original file line number Diff line number Diff line change
@@ -24,15 +24,17 @@ For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs
- **Cross-platform** - Support for ...
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
- Node 12, 14, 16, 18
- NodeJS 12+ ([LTS releases](https://github.com/nodejs/Release))
- Chrome, Safari, Firefox, Edge browsers
- Webpack and rollup.js module bundlers
- [React Native / Expo](#react-native--expo)
- **Secure** - Cryptographically-strong random values
- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
- **CLI** - Includes the [`uuid` command line](#command-line) utility

**Upgrading from `uuid@3`?** Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details.
> **Note** Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details.
> **Note** Only interested in creating a version 4 UUID? You might be able to use [`crypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library.
## Quickstart

@@ -147,7 +149,7 @@ Create an RFC version 1 (timestamp) UUID
| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) |
| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff |
| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) |
| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanseconds to add to `msecs`, should be 0-10,000) |
| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) |
| [`options.random`] | `Array` of 16 random bytes (0-255) |
| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |
| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
45 changes: 36 additions & 9 deletions bundlewatch.config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
{
"ci": {
"repoBranchBase": "main",
"trackBranches": ["main"]
},
"files": [
{ "path": "./examples/browser-rollup/dist/v1-size.js", "maxSize": "1.0 kB" },
{ "path": "./examples/browser-rollup/dist/v3-size.js", "maxSize": "2.1 kB" },
{ "path": "./examples/browser-rollup/dist/v4-size.js", "maxSize": "0.7 kB" },
{ "path": "./examples/browser-rollup/dist/v5-size.js", "maxSize": "1.5 kB" },

{ "path": "./examples/browser-webpack/dist/v1-size.js", "maxSize": "1.0 kB" },
{ "path": "./examples/browser-webpack/dist/v3-size.js", "maxSize": "2.1 kB" },
{ "path": "./examples/browser-webpack/dist/v4-size.js", "maxSize": "0.7 kB" },
{ "path": "./examples/browser-webpack/dist/v5-size.js", "maxSize": "1.5 kB" }
{
"path": "./examples/browser-rollup/dist/v1-size.js",
"maxSize": "1.0 kB"
},
{
"path": "./examples/browser-rollup/dist/v3-size.js",
"maxSize": "2.1 kB"
},
{
"path": "./examples/browser-rollup/dist/v4-size.js",
"maxSize": "0.7 kB"
},
{
"path": "./examples/browser-rollup/dist/v5-size.js",
"maxSize": "1.5 kB"
},
{
"path": "./examples/browser-webpack/dist/v1-size.js",
"maxSize": "1.0 kB"
},
{
"path": "./examples/browser-webpack/dist/v3-size.js",
"maxSize": "2.1 kB"
},
{
"path": "./examples/browser-webpack/dist/v4-size.js",
"maxSize": "0.7 kB"
},
{
"path": "./examples/browser-webpack/dist/v5-size.js",
"maxSize": "1.5 kB"
}
]
}
Loading