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

docs: add note about removal of default export #372

Merged
merged 2 commits into from Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Expand Up @@ -24,11 +24,13 @@ decided to jump v4.x, v5.x and v6.x in order to avoid any confusion with [versio
4](#version-4-random) and [version 5](#version-5-namespace) UUIDs and the [version 6 UUID
proposal](http://gh.peabody.io/uuidv6/).

### Deep Requires now Deprecated

In v3.x of this library we were promoting the use of deep requires to reduce bundlesize for browser
builds:

```javascript
const uuidv4 = require('uuid/v4');
const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED!
uuidv4();
```

Expand All @@ -51,6 +53,16 @@ const { v4: uuidv4 } = require('uuid');
uuidv4();
```

### Default Export Removed

v3.x of this library was exporting the Version 4 UUID method as a default export:

```javascript
const uuid = require('uuid'); // <== REMOVED!
```

This usage pattern was already discouraged in v3.x and has been removed in v7.x.

## Quickstart - Node.js/CommonJS

```shell
Expand Down
14 changes: 13 additions & 1 deletion README_js.md
Expand Up @@ -37,11 +37,13 @@ decided to jump v4.x, v5.x and v6.x in order to avoid any confusion with [versio
4](#version-4-random) and [version 5](#version-5-namespace) UUIDs and the [version 6 UUID
proposal](http://gh.peabody.io/uuidv6/).

### Deep Requires now Deprecated

In v3.x of this library we were promoting the use of deep requires to reduce bundlesize for browser
builds:

```javascript
const uuidv4 = require('uuid/v4');
const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED!
uuidv4();
```

Expand All @@ -64,6 +66,16 @@ const { v4: uuidv4 } = require('uuid');
uuidv4();
```

### Default Export Removed

v3.x of this library was exporting the Version 4 UUID method as a default export:

```javascript
const uuid = require('uuid'); // <== REMOVED!
```

This usage pattern was already discouraged in v3.x and has been removed in v7.x.

## Quickstart - Node.js/CommonJS

```shell
Expand Down