Skip to content

Commit

Permalink
feat: remove deep requires
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Deep requiring specific algorithms of this library like
require('uuid/v4'), which has been deprecated in uuid@7, is no longer
supported.

Instead use the named exports that this module exports.

For ECMAScript Modules (ESM):

```javascript
import { v4 as uuidv4 } from 'uuid';
uuidv4();
```

For CommonJS:

```javascript
const { v4: uuidv4 } = require('uuid');
uuidv4();
```

No longer supported is this:

```javascript
const uuidv4 = require('uuid/v4'); // <== NO LONGER SUPPORTED!
uuidv4();
```
  • Loading branch information
ctavan committed Apr 29, 2020
1 parent 2d9f590 commit 94e2f3e
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 92 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,13 @@ import { v4 as uuidv4 } from 'uuid';
Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if
you find one, please).

## Upgrading From uuid\@7

### Deep Requires No Longer Supported

Deep requires, [which have been deprecated in uuid\@7](#deep-requires-now-deprecated) are now no
longer supported.

## Upgrading From uuid\@3

"_Wait... what happened to uuid\@4 - uuid\@6?!?_"
Expand Down
7 changes: 7 additions & 0 deletions README_js.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,13 @@ import { v4 as uuidv4 } from 'uuid';
Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if
you find one, please).

## Upgrading From uuid\@7

### Deep Requires No Longer Supported

Deep requires, [which have been deprecated in uuid\@7](#deep-requires-now-deprecated) are now no
longer supported.

## Upgrading From uuid\@3

"_Wait... what happened to uuid\@4 - uuid\@6?!?_"
Expand Down
20 changes: 0 additions & 20 deletions deprecate.js

This file was deleted.

5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@
"CONTRIBUTING.md",
"LICENSE.md",
"README.md",
"deprecate.js",
"dist",
"v1.js",
"v3.js",
"v4.js",
"v5.js",
"wrapper.mjs"
],
"devDependencies": {
Expand Down
35 changes: 0 additions & 35 deletions test/unit/deep-require-deprecation.test.js

This file was deleted.

8 changes: 0 additions & 8 deletions v1.js

This file was deleted.

8 changes: 0 additions & 8 deletions v3.js

This file was deleted.

8 changes: 0 additions & 8 deletions v4.js

This file was deleted.

8 changes: 0 additions & 8 deletions v5.js

This file was deleted.

0 comments on commit 94e2f3e

Please sign in to comment.