mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-23 20:18:42 +08:00
chore: move ci.js to ci.cjs
This commit is contained in:
@@ -36,7 +36,7 @@ jobs:
|
|||||||
scope: '@toeverything'
|
scope: '@toeverything'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- run: node scripts/module-resolve/ci.js
|
- run: node scripts/module-resolve/ci.cjs
|
||||||
|
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ jobs:
|
|||||||
scope: '@toeverything'
|
scope: '@toeverything'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- run: node scripts/module-resolve/ci.js
|
- run: node scripts/module-resolve/ci.cjs
|
||||||
|
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
scope: '@toeverything'
|
scope: '@toeverything'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- run: node scripts/module-resolve/ci.js
|
- run: node scripts/module-resolve/ci.cjs
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --no-frozen-lockfile
|
run: pnpm install --no-frozen-lockfile
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ Thumbs.db
|
|||||||
out/
|
out/
|
||||||
|
|
||||||
module-resolve.js
|
module-resolve.js
|
||||||
|
module-resolve.cjs
|
||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
|
|||||||
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
function getCustomize() {
|
function getCustomize() {
|
||||||
const customed = fs.existsSync('./module-resolve.js');
|
const customed = fs.existsSync('./module-resolve.cjs');
|
||||||
if (!customed) {
|
if (!customed) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const script = require('./module-resolve.js');
|
const script = require('./module-resolve.cjs');
|
||||||
return script && script.resolve;
|
return script && script.resolve;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,9 @@ const fs = require('fs');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const templatePath = path.resolve(__dirname, 'module-resolve.tmpl.js');
|
const templatePath = path.resolve(__dirname, 'module-resolve.tmpl.js');
|
||||||
const destinationPath = path.resolve(__dirname, '../../module-resolve.js');
|
const destinationPath = path.resolve(__dirname, '../../module-resolve.cjs');
|
||||||
|
|
||||||
console.log('template path', templatePath);
|
console.log('template path', templatePath);
|
||||||
console.log('destination path', destinationPath);
|
console.log('destination path', destinationPath);
|
||||||
|
|
||||||
fs.copyFileSync(
|
fs.copyFileSync(templatePath, destinationPath);
|
||||||
templatePath,
|
|
||||||
destinationPath
|
|
||||||
);
|
|
||||||
Reference in New Issue
Block a user