Skip to content

Commit

Permalink
chore: update the version to 0.7.0
Browse files Browse the repository at this point in the history
BREAKING CHANGE: API changes in regards of names of project types.

fix #14, fix #16
  • Loading branch information
alanrodas committed Jan 24, 2024
1 parent f61244c commit 3593caf
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 28 deletions.
22 changes: 18 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
## <small>0.6.1 (2024-01-24)</small>
# [0.7.0](https://github.com/gobstones/gobstones-scripts/compare/v0.6.0...v0.7.0) (2024-01-24)

* refactor: major refactor of configuration system ([3bf8c76](https://github.com/gobstones/gobstones-scripts/commit/3bf8c76))
* build(husky): change the way the scripts are run in bash ([36476d7](https://github.com/gobstones/gobstones-scripts/commit/36476d7))

### Code Refactoring

### BREAKING CHANGE
* major refactor of configuration system ([3cdc7c0](https://github.com/gobstones/gobstones-scripts/commit/3cdc7c046a635dfab5709649746efc517efd6c90))


### BREAKING CHANGES

* The API of the configuration was completely changed. The name of the typedoc
configuration file, typedoc.js, was changed to typedoc.config.js to properly support windows
consoles.



## <small>0.6.1 (2024-01-24)</small>

- refactor: major refactor of configuration system ([3bf8c76](https://github.com/gobstones/gobstones-scripts/commit/3bf8c76))
- build(husky): change the way the scripts are run in bash ([36476d7](https://github.com/gobstones/gobstones-scripts/commit/36476d7))

### BREAKING CHANGE

- The API of the configuration was completely changed. The name of the typedoc
configuration file, typedoc.js, was changed to typedoc.config.js to properly support windows
consoles.

## <small>0.6.1 (2024-01-24)</small>

- refactor: major refactor of configuration system ([cfdaa55](https://github.com/gobstones/gobstones-scripts/commit/cfdaa55))
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The `update` sub-command is intended to update the project's configuration files

The command has the following options.

- `-i, --items <items> `: The items to update. One of `all`, `license`, `contributing`, `editorconfig`, `prettier`, `npm`, `eslint`, `git` or `commitlint`. Defaults to `all`.
- `-i, --items <item> `: The items to update. One of `all`, `license`, `contributing`, `editorconfig`, `prettier`, `npm`, `eslint`, `git` or `commitlint`. Defaults to `all`.
- `-t, --type <project-type>`: The project type to create, one of `library`, `cliLibrary`, `reactLibrary` or `webLibrary`. Defaults to `library`.
- `-s, --silent`: Run silently, not displaying the tool's banner.
- `-D, --debug`: Run in debug mode, printing all the internal tool's processing.
Expand Down Expand Up @@ -140,7 +140,7 @@ Some tools, like **typescript**, **rollup**, **typedoc**, **jest** and **nps** h

This sub-command have the following options:

- `-i, --items <items> `: The items to update. One of `all`, `nps`, `rollup`, `typescript`, `typedoc`, `jest`. Defaults to `all`.
- `-i, --items <item> `: The items to update. One of `all`, `nps`, `rollup`, `typescript`, `typedoc`, `jest`. Defaults to `all`.
- `-t, --type <project-type>`: The project type to create, one of `library`, `cliLibrary`, `reactLibrary` or `webLibrary`. Defaults to `library`.
- `-s, --silent`: Run silently, not displaying the tool's banner.
- `-D, --debug`: Run in debug mode, printing all the internal tool's processing.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gobstones/gobstones-scripts",
"version": "0.6.1",
"version": "0.7.0",
"description": "Scripts to abstract away build configuration of Gobstones Project's libraries and modules.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion project-types/cliLibrary/package-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"commander": "^11.1.0"
},
"devDependencies": {
"@gobstones/gobstones-scripts": "^0.6.1",
"@gobstones/gobstones-scripts": "^0.7.0",
"husky": "^8.0.2"
}
}
2 changes: 1 addition & 1 deletion project-types/library/package-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@gobstones/gobstones-core": "^0.4.7"
},
"devDependencies": {
"@gobstones/gobstones-scripts": "^0.6.1",
"@gobstones/gobstones-scripts": "^0.7.0",
"husky": "^8.0.2"
}
}
2 changes: 1 addition & 1 deletion project-types/reactLibrary/package-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@gobstones/gobstones-scripts": "^0.6.1",
"@gobstones/gobstones-scripts": "^0.7.0",
"husky": "^8.0.2"
}
}
2 changes: 1 addition & 1 deletion project-types/webLibrary/package-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@jest/globals": "^29.3.1",
"@gobstones/gobstones-scripts": "^0.6.1",
"@gobstones/gobstones-scripts": "^0.7.0",
"husky": "^8.0.2"
}
}
6 changes: 3 additions & 3 deletions src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function init(projectType?: string, packageManager?: string, isTest: boolean = f
* to update the configuration. By appending **force** as a
* subcommand, all files are updated to their latest version.
*
* @param files The file name to update, or "all" if all should be
* @param file The file name to update, or "all" if all should be
* updated (Defaults to `"all"`).
* @param force Whether to force the update of files, that is,
* override already present files in the project with their newest version
Expand Down Expand Up @@ -187,8 +187,8 @@ function eject(file: string = 'all', force: boolean = false, projectType?: strin
*
* @param command The nps command to execute.
* @param userArgs The nps command additional arguments.
* @param projectTypeName The project type to use as configuration (Defaults to `"library"`).
* @param packageManagerName The package manager to use when running commands.
* @param projectType The project type to use as configuration (Defaults to `"library"`).
* @param packageManager The package manager to use when running commands.
*
* @returns The list of updated files.
*
Expand Down
4 changes: 2 additions & 2 deletions src/cli/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ program
.description('update the root files of the project')
.option('-f, --force', 'Whether to override previous values', false)
.option(
'-i, --items <items>',
'-i, --items <item>',
`The items to update. One of "all", ${config.projectTypeFilteredFiles.copiedOnUpdate.join('", "')}`,
'all'
)
Expand Down Expand Up @@ -228,7 +228,7 @@ program
.description('eject the configuration files of the project')
.option('-f, --force', 'Whether to override previous values', false)
.option(
'-i, --items <items>',
'-i, --items <item>',
`The items to update. One of "all", ${config.projectTypeFilteredFiles.copiedOnEject.join('", "')}`,
'all'
)
Expand Down
2 changes: 1 addition & 1 deletion src/config/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
*
* @group Internal: Values
*/
export const version = '0.6.1';
export const version = '0.7.0';
6 changes: 3 additions & 3 deletions src/helpers/getBin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { PackageJsonReader } from '../helpers/PackageJsonReader';
* @group Internal: Helpers
*/
export function getBin(
projectRoot: string,
projectRootPath: string,
packageManagerDefinition: PackageManagerDefinition,
packageName: string,
binName?: string
Expand Down Expand Up @@ -64,7 +64,7 @@ export function getBin(
for (const modulesFolder of packageManagerDefinition.modulesFolders) {
logger.debug(`[getBin]: Verifying at: ${modulesFolder}`);

const packageNamePath = path.join(projectRoot, modulesFolder, packageName, 'package.json');
const packageNamePath = path.join(projectRootPath, modulesFolder, packageName, 'package.json');
if (fs.existsSync(packageNamePath)) {
logger.debug(`[getBin]: Found a package.json file at: ${packageNamePath}`, 'magenta');

Expand All @@ -80,7 +80,7 @@ export function getBin(
} else {
logger.debug(`[getBin]: No package with name found. Attempting to find native binary.`, 'magenta');

const binFile = path.join(projectRoot, modulesFolder, '.bin', binName ?? packageName);
const binFile = path.join(projectRootPath, modulesFolder, '.bin', binName ?? packageName);

if (fs.existsSync(binFile)) {
// We found a possible binary, but in some cases
Expand Down
12 changes: 4 additions & 8 deletions update-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ function replaceVersionInPackageJson(newVersion) {
}

function replaceVersionInConfig(newVersion) {
replaceInTextFile(
'./src/config/tool-config-definitions/definitions.ts',
/const version = '.*'/g,
`const version = '${newVersion}'`
);
replaceInTextFile('./src/config/about.ts', /const version = '.*'/g, `const version = '${newVersion}'`);
}

function replaceVersionInProjectPackageJson(projectName, newVersion) {
Expand All @@ -32,9 +28,9 @@ function updateToVersion(newVersion) {
replaceVersionInPackageJson(newVersion);
replaceVersionInConfig(newVersion);
replaceVersionInProjectPackageJson('library', newVersion);
replaceVersionInProjectPackageJson('cli-library', newVersion);
replaceVersionInProjectPackageJson('react-library', newVersion);
replaceVersionInProjectPackageJson('web-library', newVersion);
replaceVersionInProjectPackageJson('cliLibrary', newVersion);
replaceVersionInProjectPackageJson('reactLibrary', newVersion);
replaceVersionInProjectPackageJson('webLibrary', newVersion);
}

updateToVersion(process.argv[2]);

0 comments on commit 3593caf

Please sign in to comment.