Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: remove deep requires #426

Merged
merged 2 commits into from
Apr 29, 2020
Merged

feat: remove deep requires #426

merged 2 commits into from
Apr 29, 2020

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants