refactor: Use ESM (#8358)

* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
This commit is contained in:
syuilo
2022-02-27 11:07:39 +09:00
committed by GitHub
parent 0a882471f3
commit d071d18dd7
737 changed files with 4135 additions and 3678 deletions

View File

@ -1,3 +1,3 @@
import load from './load';
import load from './load.js';
export default load();

View File

@ -2,14 +2,13 @@
* Config loader
*/
import * as fs from 'fs';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types';
import { Source, Mixin } from './types.js';
//const _filename = fileURLToPath(import.meta.url);
const _filename = __filename;
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
/**