Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tunnckoCore/opensource
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7b80c331fd91856c55ac026505d56f84e9b66cc7
Choose a base ref
...
head repository: tunnckoCore/opensource
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 65b9bfc970940f4639a9973fbf419ccfeb6851d0
Choose a head ref
  • 9 commits
  • 183 files changed
  • 1 contributor

Commits on Jul 15, 2022

  1. fix: move to spaces again, for christ's sake

    Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
    tunnckoCore committed Jul 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    99f2878 View commit details
  2. chore: move to spaces again! forever!

    Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
    tunnckoCore committed Jul 15, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    crazy-max CrazyMax
    Copy the full SHA
    41fc253 View commit details
  3. feat(yaro): the july rewrite, based on yargs-parser

    Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
    tunnckoCore committed Jul 15, 2022
    Copy the full SHA
    62d9945 View commit details
  4. chore: relase yaro@4, hela@5, asia@3.1, xaxa@4

    Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
    tunnckoCore committed Jul 15, 2022
    Copy the full SHA
    65fc692 View commit details
  5. chore: add missing test command in @hela/preswet-tunnckocore

    Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
    tunnckoCore committed Jul 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e378dfa View commit details
  6. chore(@hela/core): fix typo

    Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
    tunnckoCore committed Jul 15, 2022
    Copy the full SHA
    11550b8 View commit details
  7. chore(meta): sync hela-workspace.json

    Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
    tunnckoCore committed Jul 15, 2022
    Copy the full SHA
    4c36014 View commit details
  8. chore: tweaks, publish

    Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
    tunnckoCore committed Jul 15, 2022
    Copy the full SHA
    098061e View commit details
  9. chore: cleanup

    Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
    tunnckoCore committed Jul 15, 2022
    Copy the full SHA
    65b9bfc View commit details
Showing with 10,203 additions and 9,715 deletions.
  1. +2 −6 .editorconfig
  2. +71 −1 .prettierignore
  3. +58 −58 @hela/cli/package.json
  4. +2 −2 @hela/cli/src/bin.js
  5. +54 −26 @hela/cli/src/index.js
  6. +55 −54 @hela/cli/src/utils.js
  7. +1 −1 @hela/cli/test/index.js
  8. +68 −67 @hela/core/package.json
  9. +36 −37 @hela/core/src/index.js
  10. +1 −1 @hela/core/test/index.js
  11. +59 −59 @hela/hela/package.json
  12. +2 −2 @hela/hela/src/bin.js
  13. +39 −39 @hela/preset-tunnckocore/package.json
  14. +8 −8 @hela/preset-tunnckocore/src/index.js
  15. +46 −47 @hela/preset-workspaces/package.json
  16. +74 −64 @hela/preset-workspaces/src/commands/affected.js
  17. +53 −51 @hela/preset-workspaces/src/commands/filter.js
  18. +78 −71 @hela/preset-workspaces/src/commands/init.js
  19. +110 −84 @hela/preset-workspaces/src/commands/publish.js
  20. +116 −116 @hela/preset-workspaces/src/commands/version.js
  21. +48 −45 @hela/preset-workspaces/src/commands/workspaces.js
  22. +26 −22 @hela/preset-workspaces/src/utils.js
  23. +122 −122 @packages/all-module-paths/src/index.js
  24. +5 −5 @packages/all-module-paths/src/main.js
  25. +41 −41 @packages/all-module-paths/test/index.js
  26. +57 −57 @packages/babel-preset-optimise/src/index.js
  27. +89 −89 @packages/babel-preset-optimise/test/index.js
  28. +37 −37 @packages/gitclone-cli/src/cli.js
  29. +17 −17 @packages/gitclone-defaults/src/index.js
  30. +35 −35 @packages/gitclone-defaults/test/index.js
  31. +2 −2 @packages/glob-cache/LICENSE.md
  32. +111 −111 @packages/glob-cache/src/index.js
  33. +219 −219 @packages/glob-cache/test/index.js
  34. +92 −92 @packages/jest-runner-docs/src/docks.js
  35. +148 −148 @packages/jest-runner-docs/src/runner.js
  36. +1 −1 @packages/jest-runner-docs/test/index.js
  37. +3 −3 @packages/jest-runner-node/foo.js
  38. +56 −56 @packages/jest-runner-node/src/config.js
  39. +51 −51 @packages/jest-runner-node/src/runner.js
  40. +1 −1 @packages/jest-runner-node/test/index.js
  41. +298 −298 @packages/jest-runner-rollup/src/runner.js
  42. +1 −1 @packages/jest-runner-rollup/test/index.js
  43. +17 −17 @packages/koa-better-body/recipes/form/index.js
  44. +21 −21 @packages/koa-better-body/recipes/formidable/index.js
  45. +17 −17 @packages/koa-better-body/recipes/multipart/index.js
  46. +15 −15 @packages/koa-better-body/src/index.js
  47. +150 −150 @packages/koa-better-body/src/utils.js
  48. +39 −39 @packages/koa-better-body/test/buffer.js
  49. +34 −34 @packages/koa-better-body/test/custom.js
  50. +45 −45 @packages/koa-better-body/test/json.js
  51. +171 −171 @packages/koa-better-body/test/multipart.js
  52. +137 −137 @packages/koa-better-body/test/options.js
  53. +26 −26 @packages/koa-better-body/test/text.js
  54. +64 −64 @packages/koa-better-body/test/urlencoded.js
  55. +48 −48 @packages/parse-commit-message/src/commit.js
  56. +45 −45 @packages/parse-commit-message/src/header.js
  57. +35 −35 @packages/parse-commit-message/src/index.js
  58. +45 −45 @packages/parse-commit-message/src/main.js
  59. +14 −14 @packages/parse-commit-message/src/plugins/increment.js
  60. +11 −11 @packages/parse-commit-message/src/plugins/is-breaking-change.js
  61. +7 −7 @packages/parse-commit-message/src/plugins/mentions.js
  62. +56 −56 @packages/parse-commit-message/src/utils.js
  63. +43 −43 @packages/parse-commit-message/test/header/check.js
  64. +28 −28 @packages/parse-commit-message/test/header/parse.js
  65. +19 −19 @packages/parse-commit-message/test/header/stringify.js
  66. +10 −10 @packages/parse-commit-message/test/header/validate.js
  67. +165 −165 @packages/parse-function/src/index.js
  68. +7 −7 @packages/parse-function/src/plugins/body.js
  69. +20 −20 @packages/parse-function/src/plugins/initial.js
  70. +21 −21 @packages/parse-function/src/plugins/params.js
  71. +11 −11 @packages/parse-function/src/plugins/props.js
  72. +31 −31 @packages/parse-function/src/utils.js
  73. +236 −236 @packages/parse-function/test/index.js
  74. +97 −97 @packages/prettier-plugin-pkgjson/src/index.js
  75. +4 −4 @packages/prettier-plugin-pkgjson/test/index.js
  76. +20 −20 @packages/stringify-github-short-url/src/index.js
  77. +29 −29 @packages/stringify-github-short-url/test/index.js
  78. +170 −170 @tunnckocore/create-jest-runner/src/createJestRunner.js
  79. +13 −13 @tunnckocore/create-jest-runner/src/fail.js
  80. +24 −24 @tunnckocore/create-jest-runner/src/index.js
  81. +12 −12 @tunnckocore/create-jest-runner/src/pass.js
  82. +13 −13 @tunnckocore/create-jest-runner/src/skip.js
  83. +38 −38 @tunnckocore/create-jest-runner/src/toTestResult.js
  84. +12 −12 @tunnckocore/create-jest-runner/src/todo.js
  85. +124 −124 @tunnckocore/create-jest-runner/src/utils.js
  86. +2 −2 @tunnckocore/create-jest-runner/test/failing.test.js
  87. +2 −2 @tunnckocore/create-jest-runner/test/fixtures/failing/jest.config.js
  88. +2 −2 @tunnckocore/create-jest-runner/test/passing.test.js
  89. +2 −2 @tunnckocore/create-jest-runner/test/skipped.test.js
  90. +28 −28 @tunnckocore/create-jest-runner/test/support/runJest.js
  91. +18 −18 @tunnckocore/create-jest-runner/test/support/runner/run.js
  92. +3 −3 @tunnckocore/create-jest-runner/test/todo.test.js
  93. +26 −26 @tunnckocore/create-project/package.json
  94. +32 −32 @tunnckocore/execa/README.md
  95. +62 −62 @tunnckocore/execa/package.json
  96. +10 −10 @tunnckocore/execa/src/index.js
  97. +24 −24 @tunnckocore/execa/test/index.js
  98. +135 −135 @tunnckocore/jest-runner-babel/src/runner.js
  99. +1 −1 @tunnckocore/jest-runner-babel/test/index.js
  100. +128 −128 @tunnckocore/jest-runner-eslint/src/runner.js
  101. +1 −1 @tunnckocore/jest-runner-eslint/test/index.js
  102. +67 −67 @tunnckocore/p-all/README.md
  103. +59 −59 @tunnckocore/p-all/package.json
  104. +71 −71 @tunnckocore/p-all/src/index.js
  105. +62 −62 @tunnckocore/p-all/test/index.js
  106. +40 −40 @tunnckocore/package-json/src/index.js
  107. +16 −16 @tunnckocore/package-json/test/index.js
  108. +1 −1 @tunnckocore/prettier-config/README.md
  109. +39 −39 @tunnckocore/prettier-config/package.json
  110. +36 −35 @tunnckocore/prettier-config/src/defaults.js
  111. +36 −36 @tunnckocore/prettier-config/src/index.js
  112. +45 −45 @tunnckocore/pretty-config/src/index.js
  113. +68 −68 @tunnckocore/pretty-config/src/utils.js
  114. +1 −1 @tunnckocore/pretty-config/test/index.js
  115. +41 −41 @tunnckocore/semver-increment/package.json
  116. +215 −215 @tunnckocore/semver-increment/src/index.js
  117. +10 −10 @tunnckocore/semver-increment/src/parse-options.js
  118. +31 −31 @tunnckocore/semver-increment/src/re.js
  119. +282 −282 @tunnckocore/utils/src/index.js
  120. +4 −4 @tunnckocore/utils/test/fixtures/yarn-workspaces/package.json
  121. +207 −207 @tunnckocore/utils/test/index.js
  122. +3 −3 asia/README.md
  123. +3 −3 asia/asia-cli/README.md
  124. +66 −66 asia/asia-cli/package.json
  125. +10 −15 asia/asia-cli/src/bin.js
  126. +87 −55 asia/asia-cli/src/index.js
  127. +0 −30 asia/asia-cli/src/program.js
  128. +3 −3 asia/asia-core/README.md
  129. +3 −3 asia/asia-core/example.js
  130. +61 −61 asia/asia-core/package.json
  131. +77 −77 asia/asia-core/src/index.js
  132. +41 −41 asia/asia-core/src/utils.js
  133. +2 −2 asia/asia-core/test/index.js
  134. +3 −3 asia/asia/README.md
  135. +3 −3 asia/asia/asia.config.js
  136. +3 −3 asia/asia/deno-example.js
  137. +3 −3 asia/asia/node-example.js
  138. +62 −62 asia/asia/package.json
  139. +95 −95 asia/asia/src/cache.js
  140. +7 −7 asia/asia/src/index.js
  141. +38 −38 asia/asia/src/main.js
  142. +17 −17 asia/asia/src/mod.ts
  143. +2 −2 asia/asia/test/index.js
  144. +422 −408 hela-workspace.json
  145. +29 −0 hela.config.foo.js
  146. +57 −57 modules/arr-includes/package.json
  147. +21 −21 modules/arr-includes/src/index.js
  148. +30 −30 modules/arr-includes/test/index.js
  149. +66 −66 modules/gitcommit/package.json
  150. +1 −1 modules/gitcommit/src/index.js
  151. +1 −1 modules/gitcommit/test/index.js
  152. +2 −2 modules/ip-filter/LICENSE.md
  153. +96 −96 modules/ip-filter/package.json
  154. +14 −14 modules/ip-filter/src/index.js
  155. +33 −33 modules/ip-filter/test/index.js
  156. +26 −26 modules/kind-error/package.json
  157. +95 −95 modules/to-file-path/package.json
  158. +15 −15 modules/to-file-path/src/index.js
  159. +39 −39 modules/to-file-path/test/test.js
  160. +197 −0 modules/yaro/README.md
  161. +27 −27 modules/yaro/example.js
  162. +37 −37 modules/yaro/package.json
  163. +559 −0 modules/yaro/src/core.js
  164. +13 −645 modules/yaro/src/index.js
  165. +19 −0 modules/yaro/src/mod.ts
  166. +179 −0 modules/yaro/src/utils.js
  167. +3 −2 modules/yaro/test/index.js
  168. +35 −35 package.json
  169. +5 −6 scripts/build-mappings-for-transfer-in.js
  170. +40 −40 scripts/caching.js
  171. +4 −4 scripts/clean-node-modules.js
  172. +231 −231 scripts/create-package.js
  173. +125 −125 scripts/eslint-linter-loading.js
  174. +3 −3 xaxa/README.md
  175. +3 −3 xaxa/eslint-config-xaxa/README.md
  176. +67 −67 xaxa/eslint-config-xaxa/package.json
  177. +425 −436 xaxa/eslint-config-xaxa/src/main.js
  178. +3 −3 xaxa/xaxa/README.md
  179. +63 −66 xaxa/xaxa/package.json
  180. +8 −14 xaxa/xaxa/src/bin.js
  181. +208 −177 xaxa/xaxa/src/index.js
  182. +0 −27 xaxa/xaxa/src/program.js
  183. +69 −74 yarn.lock
8 changes: 2 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -4,14 +4,10 @@
root = true

[*]
indent_style = tab
# tab_width = 2
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 80

[*.{yml,yaml,toml}]
indent_style = space
indent_size = 2
72 changes: 71 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,72 @@
CHANGELOG.md
hela-workspace.json
fixtures
*.tsbuildinfo
*.*cache

# Build environment
dist

# Package managers lockfiles
package-lock.json
shrinkwrap.json
pnpm-lock.json

# Logs
logs
*.log
*~

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
116 changes: 58 additions & 58 deletions @hela/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
{
"name": "@hela/cli",
"version": "4.0.2",
"licenseStart": 2017,
"license": "MPL-2.0",
"description": "Hela v4. Powerful, simple and fast software development and management system.",
"author": "Charlike Mike Reagent <opensource@tunnckocore.com>",
"homepage": "https://github.com/tunnckoCore/opensource/tree/master/@hela/cli",
"funding": [
"https://ko-fi.com/tunnckoCore/commissions",
"https://github.com/sponsors/tunnckoCore"
],
"repository": {
"type": "git",
"url": "https://github.com/tunnckoCore/opensource.git",
"directory": "@hela/cli"
},
"type": "module",
"main": "src/index.js",
"files": [
"src"
],
"bin": {
"hela": "src/bin.js",
"hela-cli": "src/bin.js"
},
"engines": {
"node": ">=16 <17 || >=18 <19 || >=20"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org",
"tag": "latest"
},
"scripts": {},
"dependencies": {
"@hela/core": "*"
},
"keywords": [
"tunnckocorehq",
"tunnckocore-oss",
"hela",
"development",
"developer-experience",
"dx",
"monorepos",
"tooling",
"software development",
"jest",
"jest system",
"build system",
"monorepo tools",
"multirepo",
"jest build",
"management"
],
"contributors": [
"Charlike Mike Reagent <opensource@tunnckocore.com>"
]
"name": "@hela/cli",
"version": "5.0.0",
"licenseStart": 2017,
"license": "MPL-2.0",
"description": "Powerful, simple and fast software development and management system. Support for monorepos and non-monorepo setups. Supports multiple fixed and/or multiple independent-versioned projects in one repo.",
"author": "Charlike Mike Reagent <opensource@tunnckocore.com>",
"homepage": "https://github.com/tunnckoCore/opensource/tree/master/@hela/cli",
"funding": [
"https://ko-fi.com/tunnckoCore/commissions",
"https://github.com/sponsors/tunnckoCore"
],
"repository": {
"type": "git",
"url": "https://github.com/tunnckoCore/opensource.git",
"directory": "@hela/cli"
},
"type": "module",
"main": "src/index.js",
"files": [
"src"
],
"bin": {
"hela": "src/bin.js",
"hela-cli": "src/bin.js"
},
"engines": {
"node": ">=16 <17 || >=18 <19 || >=20"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org",
"tag": "latest"
},
"scripts": {},
"dependencies": {
"@hela/core": "*"
},
"keywords": [
"tunnckocorehq",
"tunnckocore-oss",
"hela",
"development",
"developer-experience",
"dx",
"monorepos",
"tooling",
"software development",
"jest",
"jest system",
"build system",
"monorepo tools",
"multirepo",
"jest build",
"management"
],
"contributors": [
"Charlike Mike Reagent <opensource@tunnckocore.com>"
]
}
4 changes: 2 additions & 2 deletions @hela/cli/src/bin.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import cli from './index.js';

try {
await cli();
await cli();
} catch (err) {
console.error('[hela] Failure!', err.stack);
console.error('[hela] Failure!', err.stack);
}
80 changes: 54 additions & 26 deletions @hela/cli/src/index.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,67 @@
// SPDX-License-Identifier: MPL-2.0

import process from 'node:process';
import { hela, utils } from '@hela/core';
import { hela } from '@hela/core';

import { loadConfig, tryLoadFromPackageJson } from './utils.js';

const argv = utils.parseArgv(process.argv.slice(2), {
default: {
// a duplicate of below `.option`s
cwd: process.cwd(),
showStack: false,
verbose: false,
config: 'hela.config.js',
},
alias: {
config: ['c'],
},
});

const prog = hela({ argv });
let prog = hela();

prog
.option('--cwd', 'some global flag', argv.cwd)
.option('--verbose', 'Print more verbose output', false)
.option('--showStack', 'Show more detailed info when errors', false)
.option('-c, --config', 'Path to config file', 'hela.config.js');
.option('--cwd', 'some global flag', process.cwd())
.option('--verbose', 'Print more verbose output', false)
.option('--show-stack', 'Show more detailed info when errors', false)
.option('-c, --config', 'Path to config file', {
default: 'hela.config.js',
type: 'string',
normalize: true,
});

const parsedInfo = prog.parseArgv();

export default async function main() {
const helaConfig = tryLoadFromPackageJson(argv);
const cfg = await loadConfig(helaConfig ?? argv.config, argv, prog);
const { flags: argv, defaulted } = parsedInfo;
// console.log('parsedInfo', parsedInfo);

const helaConfig = defaulted.config ? tryLoadFromPackageJson(argv) : null;
const resolved = await loadConfig(helaConfig ?? argv.config, argv, prog);

const { config: cfg /* , filepath */ } = resolved;
// if local config file is loaded, or a package from `extends`
// if (cfg.filepath.includes('node_modules') || cfg.filepath.endsWith('.js')) {
// prog.extendWith(cfg.config);
// }

// if (cfg.cli && cfg.cli.isHela && cfg.cli.isYaro) {
// prog = cfg.cli.mergeInto(prog);
// } else {
// const config = Object.fromEntries(Object.entries(cfg).sort());
// const cmds = Object.keys(config);

// const lastKey = cmds[cmds.length - 1];
// const inst = config[lastKey];
// prog = inst.mergeInto(prog);
// }

// note: usually due to that they are created with new instance
const alreadyAdded = new Set(prog.commands.map((x) => x.name));
const missingCommands = Object.keys(cfg).filter(
(cmdName) => !alreadyAdded.has(cmdName),
);

for (const cmdName of missingCommands) {
const inst = cfg[cmdName];
const command = inst.commands[0];

// note: reference hack
command.rawName = command.rawName.replace(command.parts[0], cmdName);

// const parts = command.rawName.split(' ')[1]
// console.log(command);
prog = inst.mergeInto(prog, cmdName);
}

// if local config file is loaded, or a package from `extends`
if (cfg.filepath.includes('node_modules') || cfg.filepath.endsWith('.js')) {
prog.extendWith(cfg.config);
}
// console.log(missingCommands);

return prog.parse();
return prog.run();
}
Loading