mirror of
https://github.com/pezkuwichain/pezkuwi-dev.git
synced 2026-04-21 23:48:03 +00:00
chore: migrate git dependencies to Gitea mirror (git.pezkuwichain.io)
This commit is contained in:
+3
-3
@@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"author": "Pezkuwi Team <team@pezkuwichain.app>",
|
"author": "Pezkuwi Team <team@pezkuwichain.app>",
|
||||||
"bugs": "https://github.com/pezkuwichain/pezkuwi-dev/issues",
|
"bugs": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/issues",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.14"
|
"node": ">=18.14"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/pezkuwichain/pezkuwi-dev#readme",
|
"homepage": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"packageManager": "yarn@4.6.0",
|
"packageManager": "yarn@4.6.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pezkuwichain/pezkuwi-dev.git"
|
"url": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev.git"
|
||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"author": "Pezkuwi Team <team@pezkuwichain.app>",
|
"author": "Pezkuwi Team <team@pezkuwichain.app>",
|
||||||
"bugs": "https://github.com/pezkuwichain/pezkuwi-dev/issues",
|
"bugs": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/issues",
|
||||||
"description": "A basic test-functions-as-global library on top of node:test",
|
"description": "A basic test-functions-as-global library on top of node:test",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.14"
|
"node": ">=18.14"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/pezkuwichain/pezkuwi-dev/tree/master/packages/dev-test#readme",
|
"homepage": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/tree/master/packages/dev-test#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"name": "@pezkuwi/dev-test",
|
"name": "@pezkuwi/dev-test",
|
||||||
"repository": {
|
"repository": {
|
||||||
"directory": "packages/dev-test",
|
"directory": "packages/dev-test",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pezkuwichain/pezkuwi-dev.git"
|
"url": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev.git"
|
||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"author": "Pezkuwi Team <team@pezkuwichain.app>",
|
"author": "Pezkuwi Team <team@pezkuwichain.app>",
|
||||||
"bugs": "https://github.com/pezkuwichain/pezkuwi-dev/issues",
|
"bugs": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/issues",
|
||||||
"description": "An TS -> ESM loader for Node >= 16.12",
|
"description": "An TS -> ESM loader for Node >= 16.12",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/pezkuwichain/pezkuwi-dev/tree/master/packages/dev-ts#readme",
|
"homepage": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/tree/master/packages/dev-ts#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"name": "@pezkuwi/dev-ts",
|
"name": "@pezkuwi/dev-ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
"directory": "packages/dev-ts",
|
"directory": "packages/dev-ts",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pezkuwichain/pezkuwi-dev.git"
|
"url": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev.git"
|
||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
{
|
{
|
||||||
"author": "Pezkuwi Team <team@pezkuwichain.app>",
|
"author": "Pezkuwi Team <team@pezkuwichain.app>",
|
||||||
"bugs": "https://github.com/pezkuwichain/pezkuwi-dev/issues",
|
"bugs": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/issues",
|
||||||
"description": "A collection of shared CI scripts and development environment used by @pezkuwi projects",
|
"description": "A collection of shared CI scripts and development environment used by @pezkuwi projects",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/pezkuwichain/pezkuwi-dev/tree/master/packages/dev#readme",
|
"homepage": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/tree/master/packages/dev#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"name": "@pezkuwi/dev",
|
"name": "@pezkuwi/dev",
|
||||||
"repository": {
|
"repository": {
|
||||||
"directory": "packages/dev",
|
"directory": "packages/dev",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pezkuwichain/pezkuwi-dev.git"
|
"url": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev.git"
|
||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "./index.d.ts",
|
"types": "./index.d.ts",
|
||||||
"version": "0.85.5",
|
"version": "0.85.11",
|
||||||
"main": "./cjs/index.js",
|
"main": "./cjs/index.js",
|
||||||
"module": "./index.js",
|
"module": "./index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -363,24 +363,24 @@ function rewriteImports (dir, pkgCwd, pkgJson, replacer) {
|
|||||||
.filter((line) => !line.startsWith('//'))
|
.filter((line) => !line.startsWith('//'))
|
||||||
.map((line) =>
|
.map((line) =>
|
||||||
line
|
line
|
||||||
// handle import/export
|
// handle import/export (use [^']* to avoid capturing 'json' from with { type: 'json' })
|
||||||
.replace(/(import|export) (.*) from '(.*)'/g, (o, t, a, f) => {
|
.replace(/(import|export) (.*) from '([^']*)'/g, (o, t, a, f) => {
|
||||||
const adjusted = replacer(pkgCwd, pkgJson, dir, f);
|
const adjusted = replacer(pkgCwd, pkgJson, dir, f);
|
||||||
|
|
||||||
return adjusted
|
return adjusted
|
||||||
? `${t} ${a} from '${adjusted}'`
|
? `${t} ${a} from '${adjusted}'`
|
||||||
: o;
|
: o;
|
||||||
})
|
})
|
||||||
// handle augmented inputs
|
// handle augmented inputs (use [^']* to avoid capturing quotes from import attributes)
|
||||||
.replace(/(import|declare module) '(.*)'/g, (o, t, f) => {
|
.replace(/(import|declare module) '([^']*)'/g, (o, t, f) => {
|
||||||
const adjusted = replacer(pkgCwd, pkgJson, dir, f, t !== 'import');
|
const adjusted = replacer(pkgCwd, pkgJson, dir, f, t !== 'import');
|
||||||
|
|
||||||
return adjusted
|
return adjusted
|
||||||
? `${t} '${adjusted}'`
|
? `${t} '${adjusted}'`
|
||||||
: o;
|
: o;
|
||||||
})
|
})
|
||||||
// handle dynamic imports
|
// handle dynamic imports (use [^']* for consistency)
|
||||||
.replace(/( import|^import)\('(.*)'\)/g, (o, t, f) => {
|
.replace(/( import|^import)\('([^']*)'\)/g, (o, t, f) => {
|
||||||
const adjusted = replacer(pkgCwd, pkgJson, dir, f);
|
const adjusted = replacer(pkgCwd, pkgJson, dir, f);
|
||||||
|
|
||||||
return adjusted
|
return adjusted
|
||||||
@@ -445,7 +445,10 @@ function buildDeno () {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
function relativePath (value) {
|
function relativePath (value) {
|
||||||
return `${value && value.startsWith('.') ? value : './'}${value}`.replace(/\/\//g, '/');
|
if (!value || typeof value !== 'string') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return value.startsWith('.') ? value : `./${value}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -643,7 +646,7 @@ function findFiles (buildDir, extra = '', exclude = []) {
|
|||||||
.readdirSync(currDir)
|
.readdirSync(currDir)
|
||||||
.filter((f) => !exclude.includes(f))
|
.filter((f) => !exclude.includes(f))
|
||||||
.reduce((/** @type {[string, Record<String, unknown> | string][]} */ all, jsName) => {
|
.reduce((/** @type {[string, Record<String, unknown> | string][]} */ all, jsName) => {
|
||||||
const jsPath = `${extra}/${jsName}`;
|
const jsPath = extra ? `${extra}/${jsName}` : jsName;
|
||||||
const fullPathEsm = path.join(buildDir, jsPath);
|
const fullPathEsm = path.join(buildDir, jsPath);
|
||||||
|
|
||||||
if (fs.statSync(fullPathEsm).isDirectory()) {
|
if (fs.statSync(fullPathEsm).isDirectory()) {
|
||||||
@@ -788,11 +791,14 @@ function buildExports () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pkg.main) {
|
if (pkg.main) {
|
||||||
const main = pkg.main.startsWith('./')
|
let main = pkg.main.startsWith('./')
|
||||||
? pkg.main
|
? pkg.main
|
||||||
: `./${pkg.main}`;
|
: `./${pkg.main}`;
|
||||||
|
|
||||||
// Only add ./cjs/ prefix if main doesn't already start with ./cjs/
|
// Strip ./build/ prefix if present (source package.json may have ./build/cjs/index.js)
|
||||||
|
main = main.replace(/^\.\/build\//, './');
|
||||||
|
|
||||||
|
// Add ./cjs/ prefix if not already present (for CJS entry point)
|
||||||
pkg.main = main.startsWith('./cjs/') ? main : main.replace(/^\.\//, './cjs/');
|
pkg.main = main.startsWith('./cjs/') ? main : main.replace(/^\.\//, './cjs/');
|
||||||
pkg.module = main;
|
pkg.module = main;
|
||||||
pkg.types = main.replace('.js', '.d.ts');
|
pkg.types = main.replace('.js', '.d.ts');
|
||||||
@@ -803,11 +809,14 @@ function buildExports () {
|
|||||||
const value = pkg[k];
|
const value = pkg[k];
|
||||||
|
|
||||||
if (typeof value === 'string') {
|
if (typeof value === 'string') {
|
||||||
const entry = value.startsWith('./')
|
let entry = value.startsWith('./')
|
||||||
? value
|
? value
|
||||||
: `./${value}`;
|
: `./${value}`;
|
||||||
|
|
||||||
// Only add ./cjs/ prefix if entry doesn't already start with ./cjs/
|
// Strip ./build/ prefix if present
|
||||||
|
entry = entry.replace(/^\.\/build\//, './');
|
||||||
|
|
||||||
|
// Add ./cjs/ prefix if not already present
|
||||||
pkg[k] = entry.startsWith('./cjs/') ? entry : entry.replace(/^\.\//, './cjs/');
|
pkg[k] = entry.startsWith('./cjs/') ? entry : entry.replace(/^\.\//, './cjs/');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user