This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0729e14
commit b2794f0
Showing
107 changed files
with
1,842 additions
and
1,850 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,80 @@ | ||
const glob = require('glob') | ||
const glob = require("glob") | ||
|
||
/** | ||
* @param {string} pattern | ||
* @param {(path: string) => string} fn | ||
*/ | ||
const globMap = (pattern, fn) => glob | ||
.sync(pattern) | ||
.map(fn || ((path) => path)) | ||
.map((path) => path.replace(/\/$/, '')) | ||
const globMap = (pattern, fn) => | ||
glob | ||
.sync(pattern) | ||
.map(fn || ((path) => path)) | ||
.map((path) => path.replace(/\/$/, "")) | ||
|
||
/** | ||
* Check `path` to not include substring in `variants` | ||
* @param {string[]} variants | ||
* @return {(path: string) => boolean} | ||
*/ | ||
const exclude = (variants) => (path) => variants.every((variant) => !path.includes(variant)) | ||
const exclude = (variants) => (path) => | ||
variants.every((variant) => !path.includes(variant)) | ||
|
||
/** | ||
* Check `path` to include substring of one of `variants` | ||
* @param {string[]} variants | ||
* @return {(path: string) => boolean} | ||
*/ | ||
const include = (variants) => (path) => variants.some((variant) => path.includes(variant)) | ||
const include = (variants) => (path) => | ||
variants.some((variant) => path.includes(variant)) | ||
|
||
module.exports = { | ||
types: [ | ||
{ value: 'feat', name: 'feat: A new feature' }, | ||
{ value: 'fix', name: 'fix: A bug fix' }, | ||
{ value: 'docs', name: 'docs: Documentation only changes' }, | ||
{ value: "feat", name: "feat: A new feature" }, | ||
{ value: "fix", name: "fix: A bug fix" }, | ||
{ value: "docs", name: "docs: Documentation only changes" }, | ||
{ | ||
value: 'style', | ||
value: "style", | ||
name: | ||
'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)', | ||
"style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)", | ||
}, | ||
{ | ||
value: 'chore', | ||
value: "chore", | ||
name: | ||
'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation', | ||
"chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation", | ||
}, | ||
{ | ||
value: 'config', | ||
name: 'config: Changes in configuration files. Add new or remove old.', | ||
value: "config", | ||
name: "config: Changes in configuration files. Add new or remove old.", | ||
}, | ||
{ | ||
value: 'refactor', | ||
name: 'refactor: A code change that neither fixes a bug nor adds a feature', | ||
value: "refactor", | ||
name: | ||
"refactor: A code change that neither fixes a bug nor adds a feature", | ||
}, | ||
{ | ||
value: 'perf', | ||
name: 'perf: A code change that improves performance', | ||
value: "perf", | ||
name: "perf: A code change that improves performance", | ||
}, | ||
{ value: 'test', name: 'test: Adding missing tests' }, | ||
{ value: 'revert', name: 'revert: Revert to a commit' }, | ||
{ value: 'WIP', name: 'WIP: Work in progress' }, | ||
{ value: "test", name: "test: Adding missing tests" }, | ||
{ value: "revert", name: "revert: Revert to a commit" }, | ||
{ value: "WIP", name: "WIP: Work in progress" }, | ||
], | ||
scopes: [].concat( | ||
'app', | ||
globMap('src/*/', (path) => path.replace(/src\//, '')).filter(exclude(['features', 'ui'])), | ||
'features', | ||
globMap('src/features/*/', (path) => path.replace('src/', '')), | ||
globMap('src/features/*/features/*', (path) => path.replace('src/', '').replace(/\/features\//, '/')), | ||
'ui', | ||
globMap('src/ui/*/', (path) => path.replace(/^src\//, '')), | ||
'server', | ||
globMap('mock-server/server/*/**/', (path) => path.replace(/mock\-server\//, '')) | ||
"app", | ||
globMap("src/*/", (path) => path.replace(/src\//, "")).filter( | ||
exclude(["features", "ui"]), | ||
), | ||
"features", | ||
globMap("src/features/*/", (path) => path.replace("src/", "")), | ||
globMap("src/features/*/features/*", (path) => | ||
path.replace("src/", "").replace(/\/features\//, "/"), | ||
), | ||
"ui", | ||
globMap("src/ui/*/", (path) => path.replace(/^src\//, "")), | ||
"server", | ||
globMap("mock-server/server/*/**/", (path) => | ||
path.replace(/mock\-server\//, ""), | ||
), | ||
), | ||
allowCustomScopes: true, | ||
allowBreakingChanges: ['feat', 'fix', 'revert'], | ||
allowBreakingChanges: ["feat", "fix", "revert"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/usr/bin/env node | ||
/* eslint-disable import/no-extraneous-dependencies, no-console */ | ||
|
||
require('@babel/register')({ extensions: ['.js', '.mjs'] }) | ||
require('./server').main().catch(console.error) | ||
require("@babel/register")({ extensions: [".js", ".mjs"] }) | ||
require("./server") | ||
.main() | ||
.catch(console.error) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.