Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Sep 29, 2020
1 parent 67a25a6 commit fa9b6f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const jsesc = require('jsesc');
const emptyDirSync = require('fs-extra').emptyDirSync;
const regenerate = require('regenerate');
const UNICODE_VERSION = '13.0.0';
const unicode = require(`unicode-${ UNICODE_VERSION }`);
const unicode = require(`@unicode/unicode-${ UNICODE_VERSION }`);

/*----------------------------------------------------------------------------*/

Expand Down Expand Up @@ -79,7 +79,7 @@ for (const property of nonBinaryProperties) {
const fileName = `${ directory }/${ value }.js`;
console.log(`Creating ${ fileName }…`);
const codePoints = require(
`unicode-${ UNICODE_VERSION }/${ property }/${ value }/code-points.js`
`@unicode/unicode-${ UNICODE_VERSION }/${ property }/${ value }/code-points.js`
);
const set = regenerate(codePoints);
const output = `${ set.toCode() }\nmodule.exports = set;\n`;
Expand All @@ -104,7 +104,7 @@ for (const property of binaryProperties) {
const fileName = `${ directory }/${ property }.js`;
console.log(`Creating ${ fileName }…`);
const codePoints = require(
`unicode-${ UNICODE_VERSION }/Binary_Property/${ property }/code-points.js`
`@unicode/unicode-${ UNICODE_VERSION }/Binary_Property/${ property }/code-points.js`
);
const set = regenerate(codePoints);
const output = `${ set.toCode() }\nmodule.exports = set;\n`;
Expand All @@ -127,8 +127,8 @@ fs.writeFileSync('index.js', output);

const packageData = require('./package.json');
const dependencies = Object.keys(packageData.devDependencies);
const unicodePackage = dependencies.find((name) =>/^unicode-\d/.test(name));
const unicodeVersion = unicodePackage.replace(/^unicode-/g, '');
const unicodePackage = dependencies.find((name) =>/^@unicode\/unicode-\d/.test(name));
const unicodeVersion = unicodePackage.replace(/^@unicode\/unicode-/g, '');
const versionOutput = `module.exports = ${
jsesc(unicodeVersion, {
'wrap': true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"ava": "^3.5.0",
"fs-extra": "^8.1.0",
"jsesc": "^2.5.2",
"unicode-13.0.0": "^0.8.0",
"@unicode/unicode-13.0.0": "^1.0.0",
"unicode-canonical-property-names-ecmascript": "^1.0.4"
},
"scripts": {
Expand Down

0 comments on commit fa9b6f6

Please sign in to comment.