Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
1f9870ffbb | |||
8f7f34d61e | |||
2e23919503 | |||
f601cf8eb8 | |||
15af2e4e2d | |||
59c6e72187 |
128
.gitlab-ci.yml
128
.gitlab-ci.yml
@ -1,128 +0,0 @@
|
|||||||
# gitzone ci_default
|
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|
||||||
|
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- .npmci_cache/
|
|
||||||
key: '$CI_BUILD_STAGE'
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- security
|
|
||||||
- test
|
|
||||||
- release
|
|
||||||
- metadata
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- pnpm install -g pnpm
|
|
||||||
- pnpm install -g @shipzone/npmci
|
|
||||||
- npmci npm prepare
|
|
||||||
|
|
||||||
# ====================
|
|
||||||
# security stage
|
|
||||||
# ====================
|
|
||||||
# ====================
|
|
||||||
# security stage
|
|
||||||
# ====================
|
|
||||||
auditProductionDependencies:
|
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|
||||||
stage: security
|
|
||||||
script:
|
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
- npmci command pnpm audit --audit-level=high --prod
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
auditDevDependencies:
|
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|
||||||
stage: security
|
|
||||||
script:
|
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
- npmci command pnpm audit --audit-level=high --dev
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
# ====================
|
|
||||||
# test stage
|
|
||||||
# ====================
|
|
||||||
|
|
||||||
testStable:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci node install stable
|
|
||||||
- npmci npm install
|
|
||||||
- npmci npm test
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
testBuild:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci node install stable
|
|
||||||
- npmci npm install
|
|
||||||
- npmci npm build
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
release:
|
|
||||||
stage: release
|
|
||||||
script:
|
|
||||||
- npmci node install stable
|
|
||||||
- npmci npm publish
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
# ====================
|
|
||||||
# metadata stage
|
|
||||||
# ====================
|
|
||||||
codequality:
|
|
||||||
stage: metadata
|
|
||||||
allow_failure: true
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
script:
|
|
||||||
- npmci command npm install -g typescript
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci npm install
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- priv
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
stage: metadata
|
|
||||||
script:
|
|
||||||
- npmci trigger
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
pages:
|
|
||||||
stage: metadata
|
|
||||||
script:
|
|
||||||
- npmci node install stable
|
|
||||||
- npmci npm install
|
|
||||||
- npmci command npm run buildDocs
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
artifacts:
|
|
||||||
expire_in: 1 week
|
|
||||||
paths:
|
|
||||||
- public
|
|
||||||
allow_failure: true
|
|
22
changelog.md
22
changelog.md
@ -1,5 +1,27 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-01-28 - 2.2.2 - fix(ci)
|
||||||
|
Remove GitLab CI configuration
|
||||||
|
|
||||||
|
|
||||||
|
## 2025-01-28 - 2.2.1 - fix(core)
|
||||||
|
Update dependencies to improve stability and performance.
|
||||||
|
|
||||||
|
- Updated @git.zone/tspublish from version ^1.7.5 to ^1.9.1.
|
||||||
|
- Updated @push.rocks/smartfile from version ^11.0.21 to ^11.1.5.
|
||||||
|
- Updated @push.rocks/smartpromise from version ^4.0.4 to ^4.2.2.
|
||||||
|
- Updated typescript from version 5.6.3 to 5.7.3.
|
||||||
|
- Updated @push.rocks/tapbundle from version ^5.0.23 to ^5.5.6.
|
||||||
|
- Updated @types/node from version ^22.8.7 to ^22.12.0.
|
||||||
|
|
||||||
|
## 2024-11-05 - 2.2.0 - feat(cli)
|
||||||
|
Enhance CLI for TypeScript folder compilation ordering based on rank and predefined rules.
|
||||||
|
|
||||||
|
- CLI now supports automatic ordering of TypeScript folders for compilation using tspublish.json based ranking.
|
||||||
|
- Ensures 'ts_interfaces' and 'ts_shared' are always transpiled first if certain conditions are met.
|
||||||
|
- Updated TypeScript compilerOptions to support additional path transformations.
|
||||||
|
- Updated dependencies versions and added '@git.zone/tspublish' in ts/plugins.ts.
|
||||||
|
|
||||||
## 2024-10-27 - 2.1.85 - fix(compiler)
|
## 2024-10-27 - 2.1.85 - fix(compiler)
|
||||||
Improve path handling in compiler options
|
Improve path handling in compiler options
|
||||||
|
|
||||||
|
13
package.json
13
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@git.zone/tsbuild",
|
"name": "@git.zone/tsbuild",
|
||||||
"version": "2.1.85",
|
"version": "2.2.2",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "TypeScript nightly to easily make use of latest features",
|
"description": "TypeScript nightly to easily make use of latest features",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -28,19 +28,20 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/tsn#README",
|
"homepage": "https://gitlab.com/pushrocks/tsn#README",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@git.zone/tspublish": "^1.9.1",
|
||||||
"@push.rocks/early": "^4.0.4",
|
"@push.rocks/early": "^4.0.4",
|
||||||
"@push.rocks/smartcli": "^4.0.11",
|
"@push.rocks/smartcli": "^4.0.11",
|
||||||
"@push.rocks/smartdelay": "^3.0.5",
|
"@push.rocks/smartdelay": "^3.0.5",
|
||||||
"@push.rocks/smartfile": "^11.0.21",
|
"@push.rocks/smartfile": "^11.1.5",
|
||||||
"@push.rocks/smartlog": "^3.0.7",
|
"@push.rocks/smartlog": "^3.0.7",
|
||||||
"@push.rocks/smartpath": "^5.0.18",
|
"@push.rocks/smartpath": "^5.0.18",
|
||||||
"@push.rocks/smartpromise": "^4.0.4",
|
"@push.rocks/smartpromise": "^4.2.2",
|
||||||
"typescript": "5.5.2"
|
"typescript": "5.7.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsrun": "^1.2.47",
|
"@git.zone/tsrun": "^1.2.47",
|
||||||
"@push.rocks/tapbundle": "^5.0.23",
|
"@push.rocks/tapbundle": "^5.5.6",
|
||||||
"@types/node": "^20.14.8"
|
"@types/node": "^22.12.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
5094
pnpm-lock.yaml
generated
5094
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/tsbuild',
|
name: '@git.zone/tsbuild',
|
||||||
version: '2.1.85',
|
version: '2.2.2',
|
||||||
description: 'TypeScript nightly to easily make use of latest features'
|
description: 'TypeScript nightly to easily make use of latest features'
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,13 @@ export {
|
|||||||
path
|
path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @git.zone scope
|
||||||
|
import * as tspublish from '@git.zone/tspublish';
|
||||||
|
|
||||||
|
export {
|
||||||
|
tspublish
|
||||||
|
}
|
||||||
|
|
||||||
// @push.rocks scope
|
// @push.rocks scope
|
||||||
import * as smartcli from '@push.rocks/smartcli';
|
import * as smartcli from '@push.rocks/smartcli';
|
||||||
import * as smartdelay from '@push.rocks/smartdelay';
|
import * as smartdelay from '@push.rocks/smartdelay';
|
||||||
|
@ -62,6 +62,9 @@ export const mergeCompilerOptions = (
|
|||||||
if (tsconfig && tsconfig.compilerOptions && tsconfig.compilerOptions.paths) {
|
if (tsconfig && tsconfig.compilerOptions && tsconfig.compilerOptions.paths) {
|
||||||
console.log('paths found in tsconfig.json');
|
console.log('paths found in tsconfig.json');
|
||||||
returnObject.paths = tsconfig.compilerOptions.paths;
|
returnObject.paths = tsconfig.compilerOptions.paths;
|
||||||
|
for (const path of Object.keys(tsconfig.compilerOptions.paths)) {
|
||||||
|
returnObject.paths[path][0] = returnObject.paths[path][0].replace('./ts_', './dist_ts_');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return returnObject;
|
return returnObject;
|
||||||
})(),
|
})(),
|
||||||
|
@ -37,24 +37,52 @@ export const runCli = async () => {
|
|||||||
*/
|
*/
|
||||||
tsbuildCli.addCommand('tsfolders').subscribe(async (argvArg) => {
|
tsbuildCli.addCommand('tsfolders').subscribe(async (argvArg) => {
|
||||||
const tsFolders = await plugins.smartfile.fs.listFolders(paths.cwd, /^ts/);
|
const tsFolders = await plugins.smartfile.fs.listFolders(paths.cwd, /^ts/);
|
||||||
// lets make sure shared is always transpiled first
|
|
||||||
const indexShared = tsFolders.indexOf('ts_shared');
|
// Now tsFolders contains all other folders except 'ts_shared' and 'ts_interfaces'
|
||||||
if (indexShared > -1) {
|
|
||||||
tsFolders.splice(indexShared, 1);
|
// We've established a base order. Now let's look at tspublish.json based ranking.
|
||||||
tsFolders.unshift('ts_shared');
|
const tsPublishInstance = new plugins.tspublish.TsPublish();
|
||||||
|
const tsPublishModules = await tsPublishInstance.getModuleSubDirs(paths.cwd);
|
||||||
|
// tsPublishModules is an object: { [folderName]: tspublishJsonData }
|
||||||
|
|
||||||
|
// Create an array with folder names and their ranks
|
||||||
|
const foldersWithOrder = [];
|
||||||
|
|
||||||
|
for (const folder of tsFolders) {
|
||||||
|
let rank = Infinity; // Default rank if not specified
|
||||||
|
if (tsPublishModules[folder] && tsPublishModules[folder].order !== undefined) {
|
||||||
|
rank = tsPublishModules[folder].order;
|
||||||
|
}
|
||||||
|
foldersWithOrder.push({ folder, rank });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort the folders based on rank
|
||||||
|
foldersWithOrder.sort((a, b) => a.rank - b.rank);
|
||||||
|
|
||||||
// lets make sure interfaces are always transpiled first
|
// Construct the sorted list of folders
|
||||||
const indexInterfaces = tsFolders.indexOf('ts_interfaces');
|
const sortedTsFolders = [];
|
||||||
if (indexInterfaces > -1) {
|
|
||||||
tsFolders.splice(indexInterfaces, 1);
|
// Add the rest of the folders in sorted order
|
||||||
tsFolders.unshift('ts_interfaces');
|
for (const item of foldersWithOrder) {
|
||||||
|
sortedTsFolders.push(item.folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Let's make sure 'ts_shared' is always transpiled first
|
||||||
|
const ensurePosition = (folderNameArg: string, ensuredPosition: number) => {
|
||||||
|
if (tsFolders.indexOf(folderNameArg) > -1 && Object.keys(tsPublishModules).indexOf(folderNameArg) === -1) {
|
||||||
|
sortedTsFolders.splice(tsFolders.indexOf(folderNameArg), 1);
|
||||||
|
sortedTsFolders.splice(ensuredPosition, 0, folderNameArg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ensurePosition('ts_interfaces', 0);
|
||||||
|
ensurePosition('ts_shared', 1);
|
||||||
|
|
||||||
|
|
||||||
const compilationCommandObject: { [key: string]: string } = {};
|
const compilationCommandObject: { [key: string]: string } = {};
|
||||||
console.log(`compiling in this order:`);
|
console.log(`compiling in this order:`);
|
||||||
console.log(tsFolders);
|
console.log(sortedTsFolders);
|
||||||
for (const tsFolder of tsFolders) {
|
for (const tsFolder of sortedTsFolders) {
|
||||||
compilationCommandObject[`./${tsFolder}/**/*.ts`] = `./dist_${tsFolder}`;
|
compilationCommandObject[`./${tsFolder}/**/*.ts`] = `./dist_${tsFolder}`;
|
||||||
}
|
}
|
||||||
await tsbuild.compileGlobStringObject(compilationCommandObject, {}, process.cwd(), argvArg);
|
await tsbuild.compileGlobStringObject(compilationCommandObject, {}, process.cwd(), argvArg);
|
||||||
|
Reference in New Issue
Block a user