Skip to content

Commit

Permalink
fix: add deep-require proxies for local testing and adjust tests (#365)
Browse files Browse the repository at this point in the history
* fix: add deep-require proxies for local testing

In the examples we reference the .local/ directory as local module. It
should match the structure

* docs: remove deprecated deep requires from examples
  • Loading branch information
ctavan committed Feb 17, 2020
1 parent 33920a9 commit 7fedc79
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .local/v1.js
1 change: 1 addition & 0 deletions .local/v3.js
1 change: 1 addition & 0 deletions .local/v4.js
1 change: 1 addition & 0 deletions .local/v5.js
8 changes: 4 additions & 4 deletions examples/node-commonjs/example.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const uuidv1 = require('uuid/v1');
const { v1: uuidv1 } = require('uuid');
console.log('uuidv1()', uuidv1());

const uuidv4 = require('uuid/v4');
const { v4: uuidv4 } = require('uuid');
console.log('uuidv4()', uuidv4());

const uuidv3 = require('uuid/v3');
const { v3: uuidv3 } = require('uuid');

// ... using predefined DNS namespace (for domain names)
console.log('uuidv3() DNS', uuidv3('hello.example.com', uuidv3.DNS));
Expand All @@ -19,7 +19,7 @@ console.log('uuidv3() URL', uuidv3('http://example.com/hello', uuidv3.URL));
const MY_NAMESPACE = '55238d15-c926-4598-b49d-cf4e913ba13c';
console.log('uuidv3() MY_NAMESPACE', uuidv3('Hello, World!', MY_NAMESPACE));

const uuidv5 = require('uuid/v5');
const { v5: uuidv5 } = require('uuid');

// ... using predefined DNS namespace (for domain names)
console.log('uuidv5() DNS', uuidv5('hello.example.com', uuidv5.DNS));
Expand Down

0 comments on commit 7fedc79

Please sign in to comment.