Skip to content

Commit

Permalink
Fix deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt committed Nov 6, 2024
1 parent 70a9277 commit 24915b6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/dataset/publish/gitlab/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import fsApi from 'fs';
import path from 'path';
import url from 'url';

import config from 'config';
import dotenv from 'dotenv';
Expand All @@ -21,10 +20,10 @@ export default async function publish({
let projectId = null;
const gitlabAPIUrl = config.get('@opentermsarchive/engine.dataset.apiBaseURL');

const [ owner, repo ] = url
.parse(config.get('@opentermsarchive/engine.dataset.versionsRepositoryURLGitLab'))
.pathname.split('/')
.filter(component => component);
const [ owner, repo ] = new URL(config.get('@opentermsarchive/engine.dataset.versionsRepositoryURLGitLab'))
.pathname
.split('/')
.filter(Boolean);
const commonParams = { owner, repo };

try {
Expand Down

0 comments on commit 24915b6

Please sign in to comment.