Skip to content

Commit

Permalink
Merge pull request #50 from jrebocho/new-features-release-1.10
Browse files Browse the repository at this point in the history
New configurations and date/time commands
  • Loading branch information
jrebocho authored Aug 22, 2021
2 parents cfcf766 + b529dee commit 63792ae
Show file tree
Hide file tree
Showing 16 changed files with 20,889 additions and 5,994 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '12.18.3'
node-version: '16.7.0'

- run: yarn install
- run: yarn test
16 changes: 9 additions & 7 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"version": "2.0.0",
"command": "npm",
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
"tasks": [
{
"taskName": "compile",
"args": ["run", "compile"]
"label": "compile",
"type": "shell",
"args": [
"run",
"compile"
],
"problemMatcher": []
}
]
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Change Log
All notable changes to the "vscode-random" extension are documented in this file.

## [1.10.0] - 2021-08-22
## Added
- New configuration to change behaviour with multiple edit cursors (Thanks to [@be-codified](https://github.com/be-codified) for the suggestion)
- New commands to generate date & time (Thanks to [@liqiangsu](https://github.com/liqiangsu) for the suggestion)
- New configurations to format date & time generated data

## Changed
- Update dependencies packages

## [1.9.0] - 2020-11-15
## Added
- Use submenus for context menu items. Submenu enabled by default (Thanks to [@johanhammar](https://github.com/johanhammar) for the suggestion & implementation!)
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Random values generation is also supported when using **multiple editors**.
# Configuration

* `vscodeRandom.contextMenu.enabled` : Enable/disable the context menu for the available data generators (enabled by default).
* `vscodeRandom.multipleEditors.generateDifferentValues` : Generate different values when using multiple editors (true by default).
* `vscodeRandom.date.shortFormat` : Date format used by the random short date command ("DD/MM/YYYY" by default). Refer to [dayjs documentation](https://day.js.org/docs/en/display/format) on how to config your custom format.
* `vscodeRandom.date.longFormat` : Date format used by the random long date command ("dddd, DD MMMM YYYY" by default). Refer to [dayjs documentation](https://day.js.org/docs/en/display/format) on how to config your custom format.
* `vscodeRandom.time.use24h` : Use 24H or AM/PM in random time commands (true by default)

# Available Commands

Expand Down Expand Up @@ -53,7 +57,12 @@ Random values generation is also supported when using **multiple editors**.
* `extension.randomHexColor` : Random hexadecimal color - Generates a random hexadecimal color
* `extension.randomRgbColor` : Random RGB color - Generates a random RGB color
* `extension.randomIban` : Random IBAN - Generates a random IBAN
* `extension.randomRegEx` : Random Regular Expression - Create random strings that match a given regular expression.
* `extension.randomRegEx` : Random Regular Expression - Generates random strings that match a given regular expression
* `extension.randomDateShort` : Random Date (short format) - Generates a random date (short format)
* `extension.randomDateLong` : Random Date (long format) - Generates a random date (long format)
* `extension.randomDateISO` : Random Date (ISO format) - Generates a random date (ISO format)
* `extension.randomTime` : Random Time - Generates a random time
* `extension.randomDateTime` : Random DateTime - Generates a random date with time

# Change Log

Expand Down
5 changes: 5 additions & 0 deletions mocks/chance.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ export const chance = {
url: jest.fn(),
color: jest.fn(),
iban: jest.fn(),
date: jest.fn(() => new Date(2021, 10, 5, 17, 47, 7)),
hour: jest.fn(({ twentyfour }) => (twentyfour ? 13 : 1)),
minute: jest.fn(() => 6),
second: jest.fn(() => 8),
ampm: jest.fn(() => 'pm'),
}
Loading

0 comments on commit 63792ae

Please sign in to comment.