Skip to content
New issue

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

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

Already on GitHub? Sign in 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.

🙌

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.

3 participants