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: tj/commander.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b2aad7a8471d434593a85306aa73777a526e9f75
Choose a base ref
...
head repository: tj/commander.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 82fcb98cc27164a98e0c5f2c6f54621b5bbceef9
Choose a head ref

Commits on Oct 15, 2015

  1. Add chinese Readme file

    monkeym4ster committed Oct 15, 2015
    Copy the full SHA
    89e77c2 View commit details
  2. Merge pull request #456 from monkeym4ster/master

    Add chinese Readme file
    zhiyelee committed Oct 15, 2015
    Copy the full SHA
    e741c18 View commit details

Commits on Dec 21, 2015

  1. Update README.md

    Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets.
    pbnj committed Dec 21, 2015
    1
    Copy the full SHA
    a33ad70 View commit details

Commits on Dec 29, 2015

  1. Merge pull request #480 from pmbenjamin/update-readme

    Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets.
    SomeKittens committed Dec 29, 2015
    Copy the full SHA
    66e487f View commit details

Commits on Jan 5, 2016

  1. when a command has a --description option, cmd.description is

    `undefined`. Prevent `TypeError` by using `_description`.
    ignacioiglesias committed Jan 5, 2016
    Copy the full SHA
    0399879 View commit details

Commits on Jan 6, 2016

  1. Merge pull request #484 from ignacioiglesias/master

    Fixes TypeError when a command has an option called `--description`
    SomeKittens committed Jan 6, 2016
    Copy the full SHA
    1452f6f View commit details

Commits on Feb 4, 2016

  1. test node.js stable

    revington committed Feb 4, 2016
    Copy the full SHA
    5549aae View commit details
  2. Merge pull request #501 from revington/test-node-stable

    test node.js stable
    SomeKittens committed Feb 4, 2016
    Copy the full SHA
    920dc87 View commit details

Commits on Feb 11, 2016

  1. add test for sub-subcommands

    Bryan Kendall committed Feb 11, 2016
    Copy the full SHA
    06f53af View commit details
  2. fix: use bin rather than localBin for subcommand

    Bryan Kendall committed Feb 11, 2016
    1
    Copy the full SHA
    33751b4 View commit details
  3. Merge pull request #502 from bkendall/fix-sub-sub-commands

    Fix Sub-Subcommands
    SomeKittens committed Feb 11, 2016
    Copy the full SHA
    c3ca1f6 View commit details
  4. For a required option, when even option flag is not given throw error…

    …. Fixes tests accordingly.
    snow01 committed Feb 11, 2016
    Copy the full SHA
    975e5a4 View commit details

Commits on Apr 4, 2016

  1. Copy the full SHA
    e7330f6 View commit details
  2. Merge pull request #519 from ycmjason/master

    added keyword commander for better search result on npm
    zhiyelee committed Apr 4, 2016
    Copy the full SHA
    ad2e539 View commit details

Commits on Apr 20, 2016

  1. Copy the full SHA
    d49573a View commit details

Commits on May 17, 2016

  1. Copy the full SHA
    aa974a7 View commit details

Commits on Jun 6, 2016

  1. Copy the full SHA
    81577a6 View commit details

Commits on Jun 24, 2016

  1. Merge pull request #1 from rike422/support_subcommand_alias

    Support the alias of Git style sub-command
    jamesr73 authored Jun 24, 2016
    Copy the full SHA
    47f678f View commit details
  2. Copy the full SHA
    9ff0fd8 View commit details

Commits on Jun 30, 2016

  1. Merge pull request #538 from a0viedo/patch-2

    link build badge to master branch
    zhiyelee authored Jun 30, 2016
    Copy the full SHA
    8bfea13 View commit details

Commits on Jul 1, 2016

  1. Try to fix travis build for node versions 0.6 and 0.8

    Limits version of should to be <9.0.0. Version 9.0.0 and above
    use caret (^) dependencies, which are not understood by the versions
    of npm available on old versions of node
    JustATrick committed Jul 1, 2016
    Copy the full SHA
    48deff9 View commit details
  2. Merge pull request #1 from jamesr73/support_subcommand_alias_help

    Test subcommand alias help
    rike422 authored Jul 1, 2016
    Copy the full SHA
    afd6f49 View commit details
  3. Merge pull request #550 from JustATrick/travis-fix-via-should

    Try to fix travis build for node versions 0.6 and 0.8
    zhiyelee authored Jul 1, 2016
    Copy the full SHA
    7a281b9 View commit details
  4. Merge pull request #525 from JustATrick/allow-literal-passthrough

    Allow literal '--' to be passed-through as an argument
    zhiyelee authored Jul 1, 2016
    Copy the full SHA
    c86ba2a View commit details

Commits on Jul 5, 2016

  1. minor update

    zhiyelee committed Jul 5, 2016
    Copy the full SHA
    ad46a4d View commit details
  2. Merge branch 'pr/545'

    zhiyelee committed Jul 5, 2016
    Copy the full SHA
    c6236d9 View commit details

Commits on Aug 21, 2016

  1. Update Readme_zh-CN.md

    asnowwolf authored Aug 21, 2016
    Copy the full SHA
    5cfcdcd View commit details

Commits on Sep 19, 2016

  1. Merge pull request #503 from snow01/master

    For a required option, when even option flag is not given throw error.
    zhiyelee authored Sep 19, 2016
    Copy the full SHA
    5b396ab View commit details

Commits on Sep 20, 2016

  1. Copy the full SHA
    ce35c35 View commit details
  2. Merge pull request #573 from tj/revert-503-master

    Revert "For a required option, when even option flag is not given throw error."
    zhiyelee authored Sep 20, 2016
    Copy the full SHA
    9aad0d0 View commit details

Commits on Nov 3, 2016

  1. Merge pull request #562 from asnowwolf/patch-1

    Update Readme_zh-CN.md
    zhiyelee authored Nov 3, 2016
    Copy the full SHA
    89858e5 View commit details

Commits on Nov 5, 2016

  1. Copy the full SHA
    274c257 View commit details

Commits on Dec 6, 2016

  1. Copy the full SHA
    8e370e8 View commit details

Commits on Dec 28, 2016

  1. Copy the full SHA
    ec38c8e View commit details

Commits on Jan 9, 2017

  1. node v6 travis test

    tugrul committed Jan 9, 2017
    Copy the full SHA
    34674a5 View commit details

Commits on Feb 15, 2017

  1. Merge pull request #602 from tugrul/master

    node v6 travis test
    zhiyelee authored Feb 15, 2017
    Copy the full SHA
    4fb738e View commit details
  2. Merge pull request #593 from junajan/patch-1

    Add save param to npm install
    zhiyelee authored Feb 15, 2017
    Copy the full SHA
    ff501a1 View commit details
  3. Merge pull request #585 from simeg/simeg-patch-1

    Add missing semi colon in readme
    zhiyelee authored Feb 15, 2017
    Copy the full SHA
    3367806 View commit details

Commits on Mar 9, 2017

  1. Fix require arguments in README.md

    It may confuse people if we `require('..')` in README.md
    I changed it to `require('commander')`
    xcatliu authored Mar 9, 2017
    Copy the full SHA
    8a4f1ad View commit details

Commits on Mar 16, 2017

  1. add executable arguments to spawn in win32

    In win32, commander just spawn the subcommander in this package's `bin` scripts.
    so, just add the `process.execArgv` into `args` is ok.
    hxsf authored Mar 16, 2017
    Copy the full SHA
    2c3cf60 View commit details

Commits on Apr 9, 2017

  1. On SemVer you do not start from 0.0.1

    You should not start one application with a fix but with an implementation of a new feature. this is why I think that this approach it is better than 0.0.1
    Nepomuceno authored Apr 9, 2017
    Copy the full SHA
    20493bb View commit details

Commits on Jun 16, 2017

  1. Merge pull request #619 from Nepomuceno/patch-1

    On SemVer you do not start from 0.0.1
    zhiyelee authored Jun 16, 2017
    Copy the full SHA
    648629f View commit details
  2. Merge pull request #610 from xcatliu/patch-1

    Fix require arguments in README.md
    zhiyelee authored Jun 16, 2017
    Copy the full SHA
    9bfc4eb View commit details

Commits on Jun 19, 2017

  1. Do not test older versions

    abetomo committed Jun 19, 2017
    Copy the full SHA
    8049258 View commit details
  2. Add new version

    abetomo committed Jun 19, 2017
    Copy the full SHA
    4c7c1cf View commit details
  3. Copy the full SHA
    579f670 View commit details
  4. Copy the full SHA
    5ac0439 View commit details
  5. Add version 5

    abetomo committed Jun 19, 2017
    Copy the full SHA
    b888282 View commit details
  6. Remove io.js

    abetomo committed Jun 19, 2017
    Copy the full SHA
    45ce032 View commit details
  7. Merge pull request #639 from abetomo/update_version_to_be_tested

    Update .travis.yml. drop support for older node.js versions.
    roman-vanesyan authored Jun 19, 2017
    Copy the full SHA
    d674384 View commit details
Showing with 31,247 additions and 2,722 deletions.
  1. +12 −0 .editorconfig
  2. +67 −0 .eslintrc.js
  3. +2 −0 .github/FUNDING.yml
  4. +48 −0 .github/PULL_REQUEST_TEMPLATE.md
  5. +7 −0 .github/dependabot.yml
  6. +57 −0 .github/workflows/codeql-analysis.yml
  7. +31 −0 .github/workflows/tests.yml
  8. +2 −0 .gitignore
  9. +0 −11 .travis.yml
  10. +1,217 −0 CHANGELOG.md
  11. +43 −0 CONTRIBUTING.md
  12. +0 −261 History.md
  13. +0 −7 Makefile
  14. +989 −226 Readme.md
  15. +1,071 −0 Readme_zh-CN.md
  16. +18 −0 SECURITY.md
  17. +192 −0 docs/deprecated.md
  18. +201 −0 docs/options-taking-varying-arguments.md
  19. +18 −0 docs/terminology.md
  20. +191 −0 docs/zh-CN/不再推荐使用的功能.md
  21. +193 −0 docs/zh-CN/可变参数的选项.md
  22. +18 −0 docs/zh-CN/术语表.md
  23. +16 −0 esm.mjs
  24. +20 −0 examples/action-this.js
  25. +24 −0 examples/argument.js
  26. +47 −0 examples/arguments-custom-processing.js
  27. +23 −0 examples/arguments-extra.js
  28. +0 −46 examples/coercion
  29. +24 −0 examples/configure-help.js
  30. +31 −0 examples/configure-output.js
  31. +50 −0 examples/custom-command-class.js
  32. +11 −18 examples/custom-help
  33. +25 −0 examples/custom-help-description
  34. +33 −0 examples/custom-help-text.js
  35. +18 −0 examples/custom-version
  36. +36 −0 examples/defaultCommand.js
  37. +0 −22 examples/defaults
  38. +20 −30 examples/deploy
  39. +12 −6 examples/description
  40. +0 −20 examples/env
  41. +0 −18 examples/express
  42. +51 −0 examples/global-options.js
  43. +0 −17 examples/help
  44. +65 −0 examples/hook.js
  45. +46 −0 examples/nestedCommands.js
  46. +24 −0 examples/options-boolean-or-value.js
  47. +26 −0 examples/options-common.js
  48. +71 −0 examples/options-conflicts.js
  49. +54 −0 examples/options-custom-processing.js
  50. +19 −0 examples/options-defaults.js
  51. +38 −0 examples/options-env.js
  52. +31 −0 examples/options-extra.js
  53. +22 −0 examples/options-implies.js
  54. +27 −0 examples/options-negatable.js
  55. +21 −0 examples/options-required.js
  56. +21 −0 examples/options-variadic.js
  57. +24 −0 examples/optsWithGlobals.js
  58. +23 −0 examples/pass-through-options.js
  59. +19 −21 examples/pizza
  60. +25 −19 examples/pm
  61. +9 −6 examples/pm-install
  62. +3 −0 examples/pm-list.js
  63. +0 −6 examples/pm-publish.js
  64. +26 −0 examples/positional-options.js
  65. +0 −17 examples/regex
  66. +19 −0 examples/split.js
  67. +37 −0 examples/string-util.js
  68. +26 −0 examples/thank.js
  69. +14 −1,097 index.js
  70. +147 −0 lib/argument.js
  71. +2,161 −0 lib/command.js
  72. +45 −0 lib/error.js
  73. +406 −0 lib/help.js
  74. +324 −0 lib/option.js
  75. +100 −0 lib/suggestSimilar.js
  76. +10,567 −0 package-lock.json
  77. +16 −0 package-support.json
  78. +61 −14 package.json
  79. +0 −12 test/fixtures/pm
  80. +0 −2 test/fixtures/pm-default
  81. +0 −3 test/fixtures/pm-install
  82. +0 −3 test/fixtures/pm-search
  83. +0 −3 test/fixtures/pmlink-install
  84. +0 −16 test/run
  85. +0 −30 test/test.arguments.js
  86. +0 −14 test/test.command.action.js
  87. +0 −58 test/test.command.allowUnknownOption.js
  88. +0 −36 test/test.command.executableSubcommand.js
  89. +0 −46 test/test.command.executableSubcommandDefault.js
  90. +0 −10 test/test.command.help.js
  91. +0 −24 test/test.command.name.js
  92. +0 −50 test/test.command.nohelp.js
  93. +0 −16 test/test.literal.args.js
  94. +0 −13 test/test.options.args.optional.given.js
  95. +0 −13 test/test.options.args.optional.js
  96. +0 −26 test/test.options.args.required.js
  97. +0 −15 test/test.options.bool.js
  98. +0 −15 test/test.options.bool.no.js
  99. +0 −15 test/test.options.bool.small.combined.js
  100. +0 −15 test/test.options.bool.small.js
  101. +0 −27 test/test.options.camelcase.js
  102. +0 −22 test/test.options.cflags.js
  103. +0 −36 test/test.options.coercion.js
  104. +0 −124 test/test.options.commands.js
  105. +0 −23 test/test.options.defaults.given.js
  106. +0 −26 test/test.options.defaults.js
  107. +0 −17 test/test.options.equals.js
  108. +0 −23 test/test.options.func.js
  109. +0 −20 test/test.options.hyphen.js
  110. +0 −13 test/test.options.large-only-with-value.js
  111. +0 −13 test/test.options.large-only.js
  112. +0 −16 test/test.options.regex.js
  113. +0 −64 test/test.variadic.args.js
  114. +28 −0 tests/args.literal.test.js
  115. +80 −0 tests/args.variadic.test.js
  116. +33 −0 tests/argument.chain.test.js
  117. +59 −0 tests/argument.choices.test.js
  118. +207 −0 tests/argument.custom-processing.test.js
  119. +34 −0 tests/argument.required.test.js
  120. +106 −0 tests/argument.variadic.test.js
  121. +122 −0 tests/command.action.test.js
  122. +61 −0 tests/command.addCommand.test.js
  123. +245 −0 tests/command.addHelpText.test.js
  124. +124 −0 tests/command.alias.test.js
  125. +129 −0 tests/command.allowExcessArguments.test.js
  126. +95 −0 tests/command.allowUnknownOption.test.js
  127. +104 −0 tests/command.argumentVariations.test.js
  128. +164 −0 tests/command.asterisk.test.js
  129. +211 −0 tests/command.chain.test.js
  130. +19 −0 tests/command.commandHelp.test.js
  131. +31 −0 tests/command.configureHelp.test.js
  132. +275 −0 tests/command.configureOutput.test.js
  133. +133 −0 tests/command.copySettings.test.js
  134. +40 −0 tests/command.createArgument.test.js
  135. +18 −0 tests/command.createHelp.test.js
  136. +42 −0 tests/command.createOption.test.js
  137. +94 −0 tests/command.default.test.js
  138. +8 −0 tests/command.description.test.js
  139. +57 −0 tests/command.error.test.js
  140. +56 −0 tests/command.executableSubcommand.inspect.test.js
  141. +110 −0 tests/command.executableSubcommand.lookup.test.js
  142. +79 −0 tests/command.executableSubcommand.mock.test.js
  143. +269 −0 tests/command.executableSubcommand.search.test.js
  144. +39 −0 tests/command.executableSubcommand.signals.test.js
  145. +17 −0 tests/command.executableSubcommand.test.js
  146. +389 −0 tests/command.exitOverride.test.js
  147. +299 −0 tests/command.help.test.js
  148. +126 −0 tests/command.helpCommand.test.js
  149. +133 −0 tests/command.helpOption.test.js
  150. +359 −0 tests/command.hook.test.js
  151. +52 −0 tests/command.name.test.js
  152. +12 −0 tests/command.nested.test.js
  153. +38 −0 tests/command.onCommand.test.js
  154. +22 −0 tests/command.option-misuse.test.js
  155. +166 −0 tests/command.parse.test.js
  156. +312 −0 tests/command.parseOptions.test.js
  157. +515 −0 tests/command.positionalOptions.test.js
  158. +122 −0 tests/command.showHelpAfterError.test.js
  159. +50 −0 tests/command.showSuggestionAfterError.test.js
  160. +8 −0 tests/command.summary.test.js
  161. +81 −0 tests/command.unknownCommand.test.js
  162. +113 −0 tests/command.unknownOption.test.js
  163. +99 −0 tests/command.usage.test.js
  164. +86 −0 tests/commander.configureCommand.test.js
  165. +36 −0 tests/createCommand.test.js
  166. +31 −0 tests/deprecated.test.js
  167. +39 −0 tests/esm-imports-test.mjs
  168. +1 −0 tests/fixtures-extensions/pm-try-cjs.cjs
  169. +1 −0 tests/fixtures-extensions/pm-try-mjs.mjs
  170. +1 −0 tests/fixtures-extensions/pm-try-ts.ts
  171. +9 −0 tests/fixtures-extensions/pm.js
  172. +1 −0 tests/fixtures/another-dir/pm
  173. +1 −0 tests/fixtures/inspect-sub.js
  174. +7 −0 tests/fixtures/inspect.js
  175. +1 −0 tests/fixtures/other-dir/pm
  176. +18 −0 tests/fixtures/pm
  177. +1 −0 tests/fixtures/pm-cache-clear.js
  178. +1 −0 tests/fixtures/pm-cache-validate.js
  179. +6 −0 tests/fixtures/pm-cache.js
  180. +5 −0 tests/fixtures/pm-default
  181. +1 −0 tests/fixtures/pm-echo.js
  182. +2 −0 tests/fixtures/pm-install
  183. +29 −0 tests/fixtures/pm-listen
  184. +0 −1 {test → tests}/fixtures/pm-publish.js
  185. +2 −0 tests/fixtures/pm-search
  186. +3 −0 tests/fixtures/pm-silent
  187. 0 {test → tests}/fixtures/pmlink
  188. +2 −0 tests/fixtures/pmlink-install
  189. +36 −0 tests/help.argumentDescription.test.js
  190. +43 −0 tests/help.commandTerm.test.js
  191. +49 −0 tests/help.commandUsage.test.js
  192. +28 −0 tests/help.longestArgumentTermLength.test.js
  193. +52 −0 tests/help.longestCommandTermLength.test.js
  194. +30 −0 tests/help.longestOptionTermLength.test.js
  195. +69 −0 tests/help.optionDescription.test.js
  196. +34 −0 tests/help.optionTerm.test.js
  197. +42 −0 tests/help.padWidth.test.js
  198. +29 −0 tests/help.sortCommands.test.js
  199. +78 −0 tests/help.sortOptions.test.js
  200. +37 −0 tests/help.subcommandDescription.test.js
  201. +210 −0 tests/help.suggestion.test.js
  202. +65 −0 tests/help.visibleArguments.test.js
  203. +33 −0 tests/help.visibleCommands.test.js
  204. +70 −0 tests/help.visibleOptions.test.js
  205. +171 −0 tests/help.wrap.test.js
  206. +135 −0 tests/incrementNodeInspectorPort.test.js
  207. +45 −0 tests/option.chain.test.js
  208. +147 −0 tests/options.bool.combo.test.js
  209. +13 −0 tests/options.bool.small.combined.test.js
  210. +137 −0 tests/options.bool.test.js
  211. +51 −0 tests/options.camelcase.test.js
  212. +57 −0 tests/options.choices.test.js
  213. +311 −0 tests/options.conflicts.test.js
  214. +141 −0 tests/options.custom-processing.test.js
  215. +193 −0 tests/options.default.test.js
  216. +101 −0 tests/options.dual-options.test.js
  217. +328 −0 tests/options.env.test.js
  218. +83 −0 tests/options.flags.test.js
  219. +59 −0 tests/options.getset.test.js
  220. +203 −0 tests/options.implies.test.js
  221. +293 −0 tests/options.mandatory.test.js
  222. +78 −0 tests/options.optional.test.js
  223. +74 −0 tests/options.opts.test.js
  224. +63 −0 tests/options.optsWithGlobals.test.js
  225. +57 −0 tests/options.preset.test.js
  226. +82 −0 tests/options.required.test.js
  227. +46 −0 tests/options.twice.test.js
  228. +83 −0 tests/options.values.test.js
  229. +170 −0 tests/options.variadic.test.js
  230. +178 −0 tests/options.version.test.js
  231. +20 −0 tests/program.test.js
  232. +48 −0 tests/ts-imports.test.ts
  233. +18 −0 tsconfig.json
  234. +879 −0 typings/index.d.ts
  235. +474 −0 typings/index.test-d.ts
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
tab_width = 2
# trim_trailing_whitespace = true
67 changes: 67 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
const javascriptSettings = {
files: ['*.js', '*.mjs'],
extends: [
'standard',
'plugin:jest/recommended'
],
rules: {
'no-else-return': ['error', { allowElseIf: false }],
'space-before-function-paren': ['error', 'never'],
// manual "semistandard" settings
semi: ['error', 'always'],
'no-extra-semi': 'error'
}
};

const typescriptSettings = {
files: ['*.ts'],
parserOptions: {
project: './tsconfig.json'
},
plugins: [
'@typescript-eslint'
],
extends: [
'standard-with-typescript'
],
rules: {
'no-else-return': ['error', { allowElseIf: false }],
'space-before-function-paren': 'off',
'@typescript-eslint/space-before-function-paren': ['error', 'never'],
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'semi',
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}
],
// manual "semistandard" settings
semi: 'off',
'@typescript-eslint/semi': ['error', 'always'],
'no-extra-semi': 'off',
'@typescript-eslint/no-extra-semi': ['error']
}
};

module.exports = {
plugins: ['jest'],
parserOptions: {
ecmaVersion: 8
},
overrides: [
javascriptSettings,
typescriptSettings,
{
files: ['*.mjs'],
parserOptions: {
sourceType: 'module'
}
}
]
};
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [tj, shadowspawn, abetomo]
tidelift: npm/commander
48 changes: 48 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Pull Request

<!--
The text in these markdown comments is instructions that will not appear in the displayed pull request,
and can be deleted.
Please submit pull requests against the develop branch.
Follow the existing code style. Check the tests succeed, including lint.
npm run test
npm run lint
Don't update the CHANGELOG or command version number. That gets done by maintainers when preparing the release.
Commander currently has zero production dependencies. That isn't a hard requirement, but is a simple story. Requests which
add a dependency are much less likely to be accepted, and we are likely to ask if there alternative approaches to avoid the dependency.
-->

## Problem

<!--
What problem are you solving?
What Issues does this relate to?
Show the broken output if appropriate.
-->

## Solution

<!--
How did you solve the problem?
Show the fixed output if appropriate.
There are a lot of forms of documentation which could need updating for a change in functionality. It
is ok if you want to show us the code to discuss before doing the extra work, and
you should say so in your comments so we focus on the concept first before talking about all the other pieces:
- TypeScript typings
- JSDoc documentation in code
- tests
- README
- examples/
-->

## ChangeLog

<!--
Optional. Suggest a line for adding to the CHANGELOG to summarise your change.
-->
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
target-branch: "develop"
directory: "/"
schedule:
interval: "weekly"
57 changes: 57 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "CodeQL"

on:
push:
branches: [ master, develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, develop ]
schedule:
- cron: '27 5 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build

on: [push, pull_request]

permissions:
contents: read

jobs:
test:
name: Test on node ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [12.x, 14.x, 16.x, 18.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: ${{ matrix.node-version }}
# Use separate run commands so command status handled correctly on Windows
- name: npm install
run: npm ci
- name: npm test
run: npm test
- name: npm run lint
run: npm run lint
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,3 +2,5 @@
node_modules
*.sock
.idea
.vscode/
coverage/
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

Loading