Skip to content

Commit dc4656d

Browse files
committed
Fix deprecated url.parse()
1 parent 86ff4fc commit dc4656d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/dataset/publish/github/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import fsApi from 'fs';
22
import path from 'path';
3-
import url from 'url';
43

54
import config from 'config';
65
import { Octokit } from 'octokit'; // eslint-disable-line import/no-unresolved
@@ -13,7 +12,7 @@ const logger = createModuleLogger('github');
1312
export default async function publish({ archivePath, releaseDate, stats }) {
1413
const octokit = new Octokit({ auth: process.env.OTA_ENGINE_GITHUB_TOKEN });
1514

16-
const [ owner, repo ] = url.parse(config.get('@opentermsarchive/engine.dataset.versionsRepositoryURL')).pathname.split('/').filter(component => component);
15+
const [ owner, repo ] = new URL(config.get('@opentermsarchive/engine.dataset.versionsRepositoryURL')).pathname.split('/').filter(component => component);
1716

1817
const tagName = `${path.basename(archivePath, path.extname(archivePath))}`; // use archive filename as Git tag
1918

0 commit comments

Comments
 (0)