feat: migrate to esm

This commit is contained in:
2023-03-16 01:58:13 +01:00
parent fd740b3091
commit 4df19e8c20
512 changed files with 3016 additions and 2222 deletions

View File

@@ -20,10 +20,10 @@ import {
MergeRequestState,
Scope,
User,
} from '@openstapps/gitlab-api/lib/types';
} from '@openstapps/gitlab-api/lib/types.js';
import {Logger} from '@openstapps/logger';
import {WebClient} from '@slack/web-api';
import {GROUPS, MAX_DEPTH_FOR_REMINDER, NOTE_PREFIX, SLACK_CHANNEL} from '../configuration';
import {GROUPS, MAX_DEPTH_FOR_REMINDER, NOTE_PREFIX, SLACK_CHANNEL} from '../configuration.js';
/**
* Remind people of open merge requests

View File

@@ -20,13 +20,13 @@ import {
MergeRequestState,
Project,
User,
} from '@openstapps/gitlab-api/lib/types';
} from '@openstapps/gitlab-api/lib/types.js';
import {Logger} from '@openstapps/logger';
import {render} from 'mustache';
import mustache from 'mustache';
import path from 'path';
import {cwd} from 'process';
import {getProjects} from '../common';
import {BOLD_LABELS, GROUPS, LABEL_WEIGHTS, NEXT_MEETING} from '../configuration';
import {getProjects} from '../common.js';
import {BOLD_LABELS, GROUPS, LABEL_WEIGHTS, NEXT_MEETING} from '../configuration.js';
import differenceInWeeks from 'date-fns/differenceInWeeks';
import formatISO from 'date-fns/formatISO';
import format from 'date-fns/format';
@@ -446,7 +446,7 @@ export async function generateReport(api: Api, label: string, template: string):
timestamp: format(Date.now(), 'PPPPpp', {locale: de}),
};
return render(template, structureForTemplate);
return mustache.render(template, structureForTemplate);
}
/**

View File

@@ -21,9 +21,9 @@ import {
Milestone,
Project,
Scope,
} from '@openstapps/gitlab-api/lib/types';
} from '@openstapps/gitlab-api/lib/types.js';
import {Logger} from '@openstapps/logger';
import {getProjects} from '../common';
import {getProjects} from '../common.js';
import {
GROUPS,
NEEDED_LABELS,
@@ -31,7 +31,7 @@ import {
NOTE_PREFIX,
PROTECTED_BRANCHES,
SCHOOLS,
} from '../configuration';
} from '../configuration.js';
/**
* Tidy issues without milestone

View File

@@ -13,9 +13,9 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Api} from '@openstapps/gitlab-api';
import {IssueState, Scope} from '@openstapps/gitlab-api/lib/types';
import {IssueState, Scope} from '@openstapps/gitlab-api/lib/types.js';
import {Logger} from '@openstapps/logger';
import {GROUPS, LAST_MEETING, NOTE_PREFIX} from '../configuration';
import {GROUPS, LAST_MEETING, NOTE_PREFIX} from '../configuration.js';
import isBefore from 'date-fns/isBefore';
/**