20 Commits

Author SHA1 Message Date
5414142deb switch to new org scheme 2023-07-10 23:54:19 +02:00
9649b3e4a8 switch to new org scheme 2023-07-10 02:41:05 +02:00
ac28f05a23 1.0.11 2022-04-28 16:26:38 +02:00
0f9b261f3e fix(core): update 2022-04-28 16:26:38 +02:00
15fa4305b9 1.0.10 2022-04-28 16:25:24 +02:00
831e0b8933 fix(core): update 2022-04-28 16:25:23 +02:00
7d808972c9 1.0.9 2022-04-28 16:19:22 +02:00
e7d7ec806e fix(core): update 2022-04-28 16:19:22 +02:00
2ecc541989 1.0.8 2022-04-28 11:24:27 +02:00
22dddb0e11 fix(core): update 2022-04-28 11:24:27 +02:00
38c233bf06 1.0.7 2022-04-27 14:15:12 +02:00
81f943f52a fix(core): update 2022-04-27 14:15:12 +02:00
8c58df37d9 1.0.6 2022-04-26 17:03:15 +02:00
f0a4c0f7dc fix(core): update 2022-04-26 17:03:15 +02:00
31cfaa69b9 1.0.5 2022-04-26 17:02:17 +02:00
0d539c34e8 fix(core): update 2022-04-26 17:02:16 +02:00
069265c122 1.0.4 2022-04-26 16:59:15 +02:00
7d2891fc8c fix(core): update 2022-04-26 16:59:15 +02:00
8d0b58d14f 1.0.3 2022-04-26 16:57:02 +02:00
e6b47a9e86 fix(core): update 2022-04-26 16:57:02 +02:00
9 changed files with 7157 additions and 492 deletions

View File

@ -3,10 +3,10 @@
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitscope": "push.rocks",
"gitrepo": "commitinfo",
"description": "bake commitinfos into code",
"npmPackagename": "@pushrocks/commitinfo",
"npmPackagename": "@push.rocks/commitinfo",
"license": "MIT",
"projectDomain": "push.rocks"
}

698
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/commitinfo",
"version": "1.0.2",
"name": "@push.rocks/commitinfo",
"version": "1.0.11",
"private": false,
"description": "bake commitinfos into code",
"main": "dist_ts/index.js",
@ -10,16 +10,15 @@
"license": "MIT",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)"
"build": "(tsbuild --web --allowimplicitany)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsbundle": "^1.0.78",
"@gitzone/tstest": "^1.0.44",
"@pushrocks/tapbundle": "^4.0.7",
"@types/node": "^14.11.2"
"@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^17.0.29"
},
"dependencies": {},
"browserslist": [
"last 1 chrome versions"
],
@ -34,5 +33,10 @@
"cli.js",
"npmextra.json",
"readme.md"
]
}
],
"dependencies": {
"@pushrocks/projectinfo": "^5.0.1",
"@pushrocks/smartfile": "^9.0.6",
"@pushrocks/smartversion": "^3.0.2"
}
}

6851
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,8 @@ import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import * as commitinfo from '../ts/index.js';
tap.test('first test', async () => {
console.log(commitinfo);
const testCommitinfo = new commitinfo.CommitInfo(process.cwd(), 'patch');
await testCommitinfo.writeIntoPotentialDirs();
});
tap.start();

11
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,11 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const name: string = '@pushrocks/commitinfo';
export const version: string = '1.0.11';
export const description: string = 'bake commitinfos into code'
export const commitinfo = {
name: '@pushrocks/commitinfo',
version: '1.0.11',
description: 'bake commitinfos into code'
}

View File

@ -1,3 +1,39 @@
import * as plugins from './commitinfo.plugins.js';
export class CommitInfo {}
export class CommitInfo {
// Instance
public projectDir: string;
public plannedCommitVersionTypeArg: 'patch' | 'minor' | 'major';
public projectinfoNpmRef: plugins.projectinfo.ProjectinfoNpm;
public smartVersionRef: plugins.smartversion.SmartVersion;
constructor(projectDirArg: string, plannedCommitVersionTypeArg: 'patch' | 'minor' | 'major') {
this.projectDir = projectDirArg;
this.plannedCommitVersionTypeArg = plannedCommitVersionTypeArg;
this.projectinfoNpmRef = new plugins.projectinfo.ProjectinfoNpm(projectDirArg);
this.smartVersionRef = new plugins.smartversion.SmartVersion(this.projectinfoNpmRef.version);
}
public async writeIntoPotentialDirs(potentialDirs: string[] = ['ts', 'ts_web']) {
const expectedDefinitiveVersion = this.smartVersionRef.getNewVersion(
this.plannedCommitVersionTypeArg
);
for (const dir of potentialDirs) {
const dirExists = plugins.smartfile.fs.isDirectory(plugins.path.join(this.projectDir, dir));
if (dirExists) {
const writePath = plugins.path.join(this.projectDir, dir, '00_commitinfo_data.ts');
await plugins.smartfile.memory.toFs(
`/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '${this.projectinfoNpmRef.name}',
version: '${expectedDefinitiveVersion.versionString}',
description: '${this.projectinfoNpmRef.packageJson.description}'
}
`,
writePath
);
}
}
}
}

View File

@ -1,2 +1,17 @@
const removeme = {};
export { removeme };
// node native
import * as path from 'path';
export {
path
}
// pushrocks scope
import * as projectinfo from '@pushrocks/projectinfo';
import * as smartfile from '@pushrocks/smartfile';
import * as smartversion from '@pushrocks/smartversion';
export {
projectinfo,
smartfile,
smartversion
}

View File

@ -1,3 +1,2 @@
import * as plugins from './commitinfo.plugins.js';
export let demoExport = 'Hi there! :) This is an exported string';
export * from './commitinfo.classes.commitinfo.js';
export { commitinfo } from './00_commitinfo_data.js';