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

Commits on Jan 4, 2021

  1. fix: change default export to named function (#545)

    Frameworks like Next.js complain about anonymous export default functions, e.g.
    
    `Anonymous function declarations cause Fast Refresh to not preserve local component state.`
    
    Versions except for v3/5 already use named exports, so update v3/5 to do the same.
    dylans authored Jan 4, 2021
    Copy the full SHA
    c57bc5a View commit details

Commits on Jan 30, 2021

  1. docs: add command 'npx' for CLI usage (#553)

    CLI usage add 'npx'
    pandori3 authored Jan 30, 2021
    Copy the full SHA
    7feb2c3 View commit details

Commits on Feb 27, 2021

  1. README verbiage for Googlebot (#560)

    * chore: discuss googlebot case in readma, fixes #546
    
    * chore: fix doc regression
    
    * chore: reword README
    
    * chore: fixup README
    broofa authored Feb 27, 2021
    Copy the full SHA
    91805f6 View commit details

Commits on Apr 11, 2021

  1. Copy the full SHA
    1c849da View commit details

Commits on Sep 7, 2021

  1. Copy the full SHA
    ec2af0c View commit details

Commits on Oct 26, 2021

  1. Copy the full SHA
    c285a4a View commit details
  2. Revert "first pass at maintainer covenant, fix #586"

    This reverts commit c285a4a.
    broofa committed Oct 26, 2021
    Copy the full SHA
    16e9cc9 View commit details

Commits on Nov 6, 2021

  1. update all dependencies to @latest, drop node@8 CI testing, add node@…

    …16 (#585)
    
    update!: update packages to latest, drop node 8 support, add node 16
    broofa authored Nov 6, 2021
    Copy the full SHA
    343e031 View commit details
  2. prettier --fix (#592)

    chore: npm run prettier:fix
    broofa authored Nov 6, 2021
    Copy the full SHA
    27b9db1 View commit details

Commits on Nov 14, 2021

  1. chore: http -> https, closes #596

    broofa committed Nov 14, 2021
    Copy the full SHA
    761324a View commit details

Commits on Nov 30, 2021

  1. chore(husky): fix husky hooks (#599)

    Husky doesn't autoinstall anymore so the hooks have to be installed manually: https://blog.typicode.com/husky-git-hooks-autoinstall
    chimurai authored Nov 30, 2021
    Copy the full SHA
    cf49e8b View commit details

Commits on Dec 2, 2021

  1. Copy the full SHA
    c9e076c View commit details
  2. chore: use Node.js 16.x for building package and tests (#601)

    Also upgrade `@wdio@6` -> `@wdio@7` since `@wdio@6` doesn't work with Node.js 16.
    ctavan authored Dec 2, 2021
    Copy the full SHA
    477559c View commit details
  3. build: drop Node.js 8.x from babel transpile target (#603)

    BREAKING CHANGE: Although in practice this is currently a noop since the resulting build does not change, the build will no longer transpiles future changes for Node.js 8.x targets, so semantically this is still a breaking change.
    ctavan authored Dec 2, 2021
    Copy the full SHA
    aa11485 View commit details
  4. feat: optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) (#597)

    This skips input validation when stringifying UUIDs that we _know_ are valid.
    Rush authored Dec 2, 2021
    Copy the full SHA
    3a033f6 View commit details

Commits on Mar 17, 2022

  1. chore: run node-esmodule package.json test only in latest node LTS (#621

    )
    
    While ESM support has been stable in current versions of Node.js 14.x and 16.x, support for importing JSON files is still experimental and evolving.
    
    Since we still want to cover the fact that the package is exporting it's package.json file, this test is now extracted to only run with the updated JSON import syntax which requires import assertions and which was introduced in Node.js 16.14.0.
    
    Fixes #619
    
    Co-authored-by: Robert Kieffer <robert@broofa.com>
    ctavan and broofa authored Mar 17, 2022
    Copy the full SHA
    e6e5412 View commit details
  2. Replace deprecated String.prototype.substr() (#623)

    String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which works similarily but isn't deprecated.
    Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
    CommanderRoot authored Mar 17, 2022
    Copy the full SHA
    4f99b5e View commit details
  3. fix: handle error when parameter is not set in v3 and v5 (#622)

    * fix: unhandle error when parameter is not set in v3 and v5
    
    * test: add unit test for v3 and v5 to test undefined/null `namespace`
    
    Authored-by: rzkytmgr <rzkytmgr@gmail.com>
    ctavan authored Mar 17, 2022
    Copy the full SHA
    fcd7388 View commit details

Commits on Mar 25, 2022

  1. chore: delete empty file (#624)

    This file was accidentally committed.
    jonpulsifer authored Mar 25, 2022
    Copy the full SHA
    7ce4e9a View commit details

Commits on May 23, 2022

  1. Copy the full SHA
    d0d6e83 View commit details

Commits on Jul 29, 2022

  1. chore: drop node 10.x to upgrade dev dependencies (#643)

    This library always aims at supporting one EOLed LTS release which by
    this time now is 12.x which has reached EOL 30 Apr 2022.
    ctavan authored Jul 29, 2022
    Copy the full SHA
    2b96e3b View commit details
  2. fix: run npm audit fix (#644)

    ctavan authored Jul 29, 2022
    Copy the full SHA
    04686f5 View commit details

Commits on Aug 3, 2022

  1. fix: add Jest/jsdom compatibility (#642)

    Jest runs browser tests in a jsdom environment which now also supports
    web crypto polyfills.
    
    Since ESM support in Jest is currently still limited, it requires a
    commonJS build for browser environments, see the discussion in
    #616 for all the details.
    
    Co-authored-by: Christoph Tavan <dev@tavan.de>
    Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
    ctavan and SimenB authored Aug 3, 2022
    5
    Copy the full SHA
    16f9c46 View commit details
  2. build: drop support for legacy browsers (IE11, Safari 10) (#604)

    BREAKING CHANGE: Drop support for browsers that don't correctly
    implement const/let and default arguments, and no longer transpile the
    browser build to ES2015.
    
    This also removes the fallback on msCrypto instead of the crypto API.
    
    Browser tests are run in the first supported version of each supported
    browser and in the latest (as of this commit) version available on
    Browserstack.
    ctavan authored Aug 3, 2022
    Copy the full SHA
    0f433e5 View commit details

Commits on Aug 4, 2022

  1. feat: remove UMD build (#645)

    BREAKING CHANGE: Remove the minified UMD build from the package.
    
    Minified code is hard to audit and since this is a widely used library
    it seems more appropriate nowadays to optimize for auditability than to
    ship a legacy module format that, at best, serves educational purposes
    nowadays.
    
    For production browser use cases, users should be using a bundler. For
    educational purposes, today's online sandboxes like replit.com offer
    convenient ways to load npm modules, so the use case for UMD through
    repos like UNPKG or jsDelivr has largely vanished.
    
    Fixes #620
    ctavan authored Aug 4, 2022
    Copy the full SHA
    e948a0f View commit details

Commits on Aug 5, 2022

  1. Copy the full SHA
    f2826b6 View commit details

Commits on Aug 12, 2022

  1. Copy the full SHA
    1110ae6 View commit details

Commits on Sep 3, 2022

  1. Copy the full SHA
    2a612dc View commit details

Commits on Sep 5, 2022

  1. chore: drop node 10.x to upgrade dev dependencies (#653)

    BREAKING CHANGE: This library always aims at supporting one EOLed LTS release
    which by this time now is 12.x which has reached EOL 30 Apr 2022.
    
    The actual change was already introduced in #643 but the commit was missing the
    breaking change label.
    ctavan authored Sep 5, 2022
    Copy the full SHA
    28a5712 View commit details
  2. chore(release): 9.0.0

    ctavan committed Sep 5, 2022
    Copy the full SHA
    4cf24c0 View commit details
Showing with 31,010 additions and 15,571 deletions.
  1. +0 −15 .babelrc.js
  2. +2 −1 .eslintignore
  3. +1 −1 .eslintrc.json
  4. +0 −34 .github/ISSUE_TEMPLATE/bug_report.md
  5. +39 −0 .github/ISSUE_TEMPLATE/bug_report.yml
  6. +0 −23 .github/ISSUE_TEMPLATE/feature_request.md
  7. +13 −0 .github/ISSUE_TEMPLATE/feature_request.yml
  8. +2 −2 .github/workflows/browser.yml
  9. +8 −8 .github/workflows/ci.yml
  10. +22 −0 .github/workflows/stale-issues.yml
  11. +4 −0 .husky/commit-msg
  12. +4 −0 .husky/pre-commit
  13. +0 −1 .local/dist
  14. +0 −1 .local/package.json
  15. +1 −0 .local/uuid/dist
  16. +1 −0 .local/uuid/package.json
  17. +1 −0 .local/uuid/v1.js
  18. +1 −0 .local/uuid/v3.js
  19. +1 −0 .local/uuid/v4.js
  20. +1 −0 .local/uuid/v5.js
  21. +1 −0 .local/uuid/wrapper.mjs
  22. +0 −1 .local/v1.js
  23. +0 −1 .local/v3.js
  24. +0 −1 .local/v4.js
  25. +0 −1 .local/v5.js
  26. +0 −1 .local/wrapper.mjs
  27. +1 −0 .prettierignore
  28. +39 −0 CHANGELOG.md
  29. +30 −73 README.md
  30. +32 −72 README_js.md
  31. +66 −0 babel.config.json
  32. +4 −4 bundlewatch.config.json
  33. +7 −2 examples/benchmark/README.md
  34. +1 −9 examples/benchmark/benchmark.html
  35. +69 −92 examples/benchmark/benchmark.js
  36. +7 −0 examples/benchmark/browser.js
  37. +6 −0 examples/benchmark/node.js
  38. +103 −8 examples/benchmark/package-lock.json
  39. +6 −3 examples/benchmark/package.json
  40. +78 −2 examples/browser-esmodules/package-lock.json
  41. +1 −1 examples/browser-esmodules/package.json
  42. +740 −60 examples/browser-rollup/package-lock.json
  43. +3 −3 examples/browser-rollup/package.json
  44. +0 −8 examples/browser-umd/README.md
  45. +0 −14 examples/browser-umd/example.html
  46. +0 −54 examples/browser-umd/example.js
  47. +0 −11 examples/browser-umd/package-lock.json
  48. +0 −12 examples/browser-umd/package.json
  49. +9 −0 examples/browser-webpack/example-all-require.html
  50. +74 −0 examples/browser-webpack/example-all-require.js
  51. +1,689 −2,187 examples/browser-webpack/package-lock.json
  52. +3 −3 examples/browser-webpack/package.json
  53. +1 −0 examples/browser-webpack/webpack.config.js
  54. +78 −2 examples/node-commonjs/package-lock.json
  55. +1 −1 examples/node-commonjs/package.json
  56. +0 −4 examples/node-esmodules/example.mjs
  57. +78 −2 examples/node-esmodules/package-lock.json
  58. +4 −2 examples/node-esmodules/package.json
  59. +4 −0 examples/node-esmodules/package.mjs
  60. +6 −0 examples/node-jest/README.md
  61. +8 −0 examples/node-jest/jsdom.test.js
  62. +6 −0 examples/node-jest/node.test.js
  63. +7,227 −0 examples/node-jest/package-lock.json
  64. +15 −0 examples/node-jest/package.json
  65. +1,689 −2,187 examples/node-webpack/package-lock.json
  66. +3 −3 examples/node-webpack/package.json
  67. +18,557 −10,368 package-lock.json
  68. +37 −41 package.json
  69. +0 −30 rollup.config.js
  70. +28 −6 scripts/build.sh
  71. +7 −1 scripts/testpack.sh
  72. +4 −0 src/native-browser.js
  73. +3 −0 src/native.js
  74. +4 −8 src/rng-browser.js
  75. +6 −3 src/stringify.js
  76. +2 −2 src/v1.js
  77. +4 −4 src/v35.js
  78. +7 −2 src/v4.js
  79. +1 −1 src/version.js
  80. +2 −6 test/browser/browser.spec.js
  81. +1 −15 test/unit/parse.test.js
  82. +35 −42 test/unit/stringify.test.js
  83. +1 −16 test/unit/v1-random.test.js
  84. +1 −16 test/unit/v1-rng.test.js
  85. +38 −30 test/unit/v35.test.js
  86. +1 −16 test/unit/v4.test.js
  87. +13 −0 test/unit/validate.test.js
  88. +68 −54 wdio.conf.js
15 changes: 0 additions & 15 deletions .babelrc.js

This file was deleted.

3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
!.babelrc.js
node_modules/
.local/
dist/
node_modules/
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"globals": {
"msCrypto": true
},
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"rules": {
"no-var": ["error"]
}
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bug report
description: File a bug against the `uuid` project
labels: ["bug"]
title: "[BUG] <title>"

body:
- type: checkboxes
attributes:
label: Before you begin...
options:
- label: I have searched the existing issues
required: true
- label: I am not using version 13.x of node (if so, please upgrade)
required: true

- type: textarea
attributes:
label: Description of the problem
validations:
required: false

- type: textarea
attributes:
label: Recipe for reproducing
description: "**IMPORTANT**: Failure to provide a [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/minimal-reproducible-example) example will result in this issue being closed without further review."
render: bash
validations:
required: false

- type: textarea
attributes:
label: Additional information

- type: textarea
attributes:
label: Environment
description: "Output of `npx envinfo --system --browsers --npmPackages --binaries` goes here:"
validations:
required: false
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Feature request
description: Suggest an idea for this project
labels: ["feature"]

body:
- type: textarea
attributes:
label: Feature description

- type: textarea
attributes:
label: Additional information
description: E.g. alternatives you've considered, examples, screenshots, or anything else that may be helpful
4 changes: 2 additions & 2 deletions .github/workflows/browser.yml
Original file line number Diff line number Diff line change
@@ -12,10 +12,10 @@ jobs:
- uses: actions/checkout@v1
with:
fetch-depth: 10
- name: Use Node.js 12.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- run: npm install
- name: Test Browser
run: npm run test:browser
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -9,16 +9,16 @@ jobs:

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

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

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 90
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-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
1 change: 0 additions & 1 deletion .local/dist

This file was deleted.

1 change: 0 additions & 1 deletion .local/package.json

This file was deleted.

1 change: 1 addition & 0 deletions .local/uuid/dist
1 change: 1 addition & 0 deletions .local/uuid/package.json
1 change: 1 addition & 0 deletions .local/uuid/v1.js
1 change: 1 addition & 0 deletions .local/uuid/v3.js
1 change: 1 addition & 0 deletions .local/uuid/v4.js
1 change: 1 addition & 0 deletions .local/uuid/v5.js
1 change: 1 addition & 0 deletions .local/uuid/wrapper.mjs
1 change: 0 additions & 1 deletion .local/v1.js

This file was deleted.

1 change: 0 additions & 1 deletion .local/v3.js

This file was deleted.

1 change: 0 additions & 1 deletion .local/v4.js

This file was deleted.

1 change: 0 additions & 1 deletion .local/v5.js

This file was deleted.

1 change: 0 additions & 1 deletion .local/wrapper.mjs

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.local/
dist/
node_modules/
README.md
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,45 @@

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.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05)

### ⚠ BREAKING CHANGES

- Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022.

- Remove the minified UMD build from the package.

Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays.

For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished.

- Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015.

This also removes the fallback on msCrypto instead of the crypto API.

Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack.

### Features

- optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#597](https://github.com/uuidjs/uuid/issues/597)) ([3a033f6](https://github.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc))
- remove UMD build ([#645](https://github.com/uuidjs/uuid/issues/645)) ([e948a0f](https://github.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#620](https://github.com/uuidjs/uuid/issues/620)
- use native crypto.randomUUID when available ([#600](https://github.com/uuidjs/uuid/issues/600)) ([c9e076c](https://github.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4))

### Bug Fixes

- add Jest/jsdom compatibility ([#642](https://github.com/uuidjs/uuid/issues/642)) ([16f9c46](https://github.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd))
- change default export to named function ([#545](https://github.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://github.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a))
- handle error when parameter is not set in v3 and v5 ([#622](https://github.com/uuidjs/uuid/issues/622)) ([fcd7388](https://github.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091))
- run npm audit fix ([#644](https://github.com/uuidjs/uuid/issues/644)) ([04686f5](https://github.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353))
- upgrading from uuid3 broken link ([#568](https://github.com/uuidjs/uuid/issues/568)) ([1c849da](https://github.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6))

### build

- drop Node.js 8.x from babel transpile target ([#603](https://github.com/uuidjs/uuid/issues/603)) ([aa11485](https://github.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5))
- drop support for legacy browsers (IE11, Safari 10) ([#604](https://github.com/uuidjs/uuid/issues/604)) ([0f433e5](https://github.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148))

- drop node 10.x to upgrade dev dependencies ([#653](https://github.com/uuidjs/uuid/issues/653)) ([28a5712](https://github.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#643](https://github.com/uuidjs/uuid/issues/643)

### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08)

### Bug Fixes
Loading