@toptal/davinci-syntax 20.0.2 → 20.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Change Log
2
2
 
3
+ ## 20.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1937](https://github.com/toptal/davinci/pull/1937) [`8b6806a6`](https://github.com/toptal/davinci/commit/8b6806a6ad1ef3f190e1e9e6a287aed12970b27f) Thanks [@dmaklygin](https://github.com/dmaklygin)! - ---
8
+
9
+ - apply identical formatting and success messages to all command logs.
10
+
11
+ - Updated dependencies [[`8b6806a6`](https://github.com/toptal/davinci/commit/8b6806a6ad1ef3f190e1e9e6a287aed12970b27f)]:
12
+ - @toptal/davinci-cli-shared@2.2.3
13
+
3
14
  ## 20.0.2
4
15
 
5
16
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-syntax",
3
- "version": "20.0.2",
3
+ "version": "20.0.3",
4
4
  "description": "Lint and prettier support",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@stylelint/postcss-css-in-js": "^0.38.0",
43
- "@toptal/davinci-cli-shared": "2.2.2",
43
+ "@toptal/davinci-cli-shared": "2.2.3",
44
44
  "@toptal/davinci-dir-lint": "^1.0.0",
45
45
  "@toptal/eslint-plugin-davinci": "5.4.2",
46
46
  "@typescript-eslint/eslint-plugin": "^5.38.0",
@@ -1,7 +1,7 @@
1
1
  import { runSync, print } from '@toptal/davinci-cli-shared'
2
2
 
3
3
  const lintCodeCommand = (paths, options) => {
4
- console.log(print.davinciGradient('Running code check...\n'))
4
+ print.header('Running code checks')
5
5
 
6
6
  const { check, ext, color } = options
7
7
 
@@ -6,7 +6,7 @@ import { Command } from 'commander'
6
6
  jest.unstable_mockModule('@toptal/davinci-cli-shared', () => ({
7
7
  runSync: jest.fn(),
8
8
  print: {
9
- davinciGradient: jest.fn(),
9
+ header: jest.fn(),
10
10
  },
11
11
  }))
12
12
 
@@ -21,7 +21,7 @@ describe('createLintCodeCommand', () => {
21
21
 
22
22
  jest.spyOn(console, 'log').mockImplementation(jest.fn())
23
23
  runSync.mockImplementation(jest.fn())
24
- print.davinciGradient.mockImplementation(jest.fn())
24
+ print.header.mockImplementation(jest.fn())
25
25
  })
26
26
 
27
27
  afterEach(() => {
@@ -129,25 +129,4 @@ describe('createLintCodeCommand', () => {
129
129
  expect(runSync).toHaveBeenCalledWith(...output)
130
130
  })
131
131
  })
132
-
133
- // describe('when rule is passed', () => {
134
- // it('calls the runSync with the correct arguments', () => {
135
- // const paths = ['file1', 'file2']
136
- // const argv = ['node', 'code', '--rule', "'@staff-portal/no-deprecated-with-path: off'", ...paths, '--check']
137
- //
138
- // const command = createLintCodeCommand(program)
139
- //
140
- // command.parse(argv)
141
- //
142
- // expect(runSync).toHaveBeenCalledWith('yarn', [
143
- // 'eslint',
144
- // '--ext=.js,.jsx,.ts,.tsx',
145
- // '--color=true',
146
- // '--rule',
147
- // "'@staff-portal/no-deprecated-with-path: off'",
148
- // 'file1',
149
- // 'file2',
150
- // ])
151
- // })
152
- // })
153
132
  })
@@ -3,7 +3,7 @@ import { print } from '@toptal/davinci-cli-shared'
3
3
  const lintDirsCommand = async paths => {
4
4
  const { default: dirLint } = await import('@toptal/davinci-dir-lint')
5
5
 
6
- print.green('Running dirs check...')
6
+ print.header('Running dirs check')
7
7
 
8
8
  const results = dirLint(paths)
9
9
 
@@ -18,7 +18,7 @@ const lintDirsCommand = async paths => {
18
18
  process.exit(1)
19
19
  }
20
20
 
21
- print.green('Done.')
21
+ print.success('Done!')
22
22
  }
23
23
 
24
24
  export const createLintDirCommand = program => {
@@ -2,7 +2,7 @@ import path from 'path'
2
2
  import { runSync, print } from '@toptal/davinci-cli-shared'
3
3
 
4
4
  const lintStylesCommand = dir => {
5
- print.green('Running styles check...', dir)
5
+ print.header('Running styles checks', dir)
6
6
 
7
7
  // This check is necessary for `lint-staged`
8
8
  // because it checks files one by one and sends