Skip to content

Conversation

@ctavan
Copy link
Member

@ctavan ctavan commented Apr 29, 2020

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):

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

For CommonJS:

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

No longer supported is this:

const uuidv4 = require('uuid/v4'); // <== NO LONGER SUPPORTED!
uuidv4();

Copy link
Member

@LinusU LinusU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

ctavan added 2 commits April 29, 2020 14:38
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();
```
@ctavan ctavan force-pushed the remove-deprecated-deep-require branch from 74b0175 to ab07f75 Compare April 29, 2020 12:39
@ctavan
Copy link
Member Author

ctavan commented Apr 29, 2020

I'll wait for @broofa's final go before merging this and pulling out a new major version release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants