Skip to content

Commit

Permalink
Merge branch 'main' into security_policy
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa committed Mar 14, 2023
2 parents 87779a2 + a571c94 commit c9cff60
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 31 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -2,6 +2,7 @@
-- This file is auto-generated from README_js.md. Changes should be made there.
-->


# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)

For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
Expand All @@ -17,11 +18,9 @@ For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
- **CLI** - Includes the [`uuid` command line](#command-line) utility

> **Note**
> Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details.
> **Note** Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details.
> **Note**
> Only interested in creating a version 4 UUID? You might be able to use [`cypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library.
> **Note** Only interested in creating a version 4 UUID? You might be able to use [`cypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library.
## Quickstart

Expand Down Expand Up @@ -462,5 +461,6 @@ const uuid = require('uuid'); // <== REMOVED!

This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`.

----
Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](https://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd)
---

Markdown generated from [README_js.md](README_js.md) by <a href="https://github.com/broofa/runmd"><image height="12px" src="https://camo.githubusercontent.com/5c7c603cd1e6a43370b0a5063d457e0dabb74cf317adc7baba183acb686ee8d0/687474703a2f2f692e696d6775722e636f6d2f634a4b6f3662552e706e67" /></a>
70 changes: 52 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -75,7 +75,7 @@
"optional-dev-dependency": "2.0.1",
"prettier": "2.7.1",
"random-seed": "0.3.0",
"runmd": "1.3.6",
"runmd": "1.3.9",
"standard-version": "9.5.0"
},
"optionalDevDependencies": {
Expand Down Expand Up @@ -109,7 +109,7 @@
"prettier:fix": "prettier --write '**/*.{js,jsx,json,md}'",
"bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
"md": "runmd --watch --output=README.md README_js.md",
"docs": "( node --version | grep -q 'v16' ) && ( npm run build && runmd --output=README.md README_js.md )",
"docs": "( node --version | grep -q 'v16' ) && ( npm run build && npx runmd --output=README.md README_js.md )",
"docs:diff": "npm run docs && git diff --quiet README.md",
"build": "./scripts/build.sh",
"prepack": "npm run build",
Expand Down
9 changes: 4 additions & 5 deletions scripts/build.sh
Expand Up @@ -4,7 +4,6 @@
ROOT="$(pwd)/$(dirname "$0")/.."
cd "$ROOT" || exit 1

PATH="$(npm bin):$PATH"
DIR="$ROOT/dist"

# Clean up output dir
Expand All @@ -26,17 +25,17 @@ mkdir -p "$DIR"
# └── bin (<-- Node.js CLI)

# Transpile CommonJS versions of files for node
babel --env-name commonjsNode src --source-root src --out-dir "$DIR" --copy-files --quiet
npx babel --env-name commonjsNode src --source-root src --out-dir "$DIR" --copy-files --quiet

# Transpile CommonJS versions of files for the browser
babel --env-name commonjsBrowser src --source-root src --out-dir "$DIR/commonjs-browser" \
npx babel --env-name commonjsBrowser src --source-root src --out-dir "$DIR/commonjs-browser" \
--copy-files --quiet

# Transpile ESM versions of files for the browser
babel --env-name esmBrowser src --source-root src --out-dir "$DIR/esm-browser" --copy-files --quiet
npx babel --env-name esmBrowser src --source-root src --out-dir "$DIR/esm-browser" --copy-files --quiet

# Transpile ESM versions of files for node
babel --env-name esmNode src --source-root src --out-dir "$DIR/esm-node" --copy-files --quiet
npx babel --env-name esmNode src --source-root src --out-dir "$DIR/esm-node" --copy-files --quiet

# No need to have the CLI files in the esm build
rm -rf "$DIR/commonjs-browser/bin"
Expand Down

0 comments on commit c9cff60

Please sign in to comment.