style: make any node build-in modules explicitly imported first
This commit is contained in:
parent
2e5652d84b
commit
57578e9398
|
@ -13,7 +13,8 @@
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'node:path';
|
||||||
|
|
||||||
import { loadFile, template } from 'presetter';
|
import { loadFile, template } from 'presetter';
|
||||||
|
|
||||||
import { getRollupParameter } from './rollup';
|
import { getRollupParameter } from './rollup';
|
||||||
|
|
|
@ -13,16 +13,16 @@
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { readdirSync } from 'fs';
|
import { readdirSync } from 'node:fs';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'node:path';
|
||||||
import { loadDynamicMap, resolveContext } from 'presetter';
|
import { loadDynamicMap, resolveContext } from 'presetter';
|
||||||
|
|
||||||
import getPresetAsset from '#index';
|
import getPresetAsset from '#index';
|
||||||
|
|
||||||
jest.mock('path', () => ({
|
jest.mock('node:path', () => ({
|
||||||
__esModule: true,
|
__esModule: true,
|
||||||
...jest.requireActual('path'),
|
...jest.requireActual('node:path'),
|
||||||
resolve: jest.fn(jest.requireActual('path').resolve),
|
resolve: jest.fn(jest.requireActual('node:path').resolve),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('fn:getPresetAsset', () => {
|
describe('fn:getPresetAsset', () => {
|
||||||
|
|
Loading…
Reference in New Issue