Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Commit cc685cc

Browse files
authored
Merge pull request #295 from styled-components/1.10.0
1.10.0
2 parents 02e907a + 0c2d33c commit cc685cc

File tree

5 files changed

+50
-2
lines changed

5 files changed

+50
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 1.10.0
2+
* upgrade @babel/core to ^7.8.3 to support new ECMAScript 2020 features by default, see #290
3+
* upgrade stylelint to 13 and other dependencies/devDependencies
4+
15
### 1.9.0
26
* upgrade stylelint to 12
37

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stylelint-processor-styled-components",
3-
"version": "1.9.0",
3+
"version": "1.10.0",
44
"description": "A stylelint processor for styled-components",
55
"main": "src/index.js",
66
"scripts": {

test/fixtures/simple/parse.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// asyncGenerators
2+
async function* test(x) {
3+
// objectRestSpread
4+
const a = {}
5+
x = { x, ...a }
6+
7+
// dynamicImport
8+
const b = import('./somewhere')
9+
10+
// optionalCatchBinding
11+
try {
12+
throw 0
13+
} catch {
14+
x = 1
15+
}
16+
17+
// optionalChaining
18+
const op = x?.a
19+
20+
// nullishCoalescingOperator
21+
x = x ?? 42
22+
}

test/simple.test.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,26 @@ describe('simple', () => {
259259
expect(warnings[4].rule).toBe('selector-type-no-unknown')
260260
})
261261
})
262+
263+
describe('parse successfully', () => {
264+
beforeAll(() => {
265+
fixture = slash(path.join(__dirname, './fixtures/simple/parse.js'))
266+
})
267+
268+
it('should have one result', () => {
269+
expect(data.results.length).toEqual(1)
270+
})
271+
272+
it('should use the right file', () => {
273+
expect(slash(data.results[0].source)).toEqual(fixture)
274+
})
275+
276+
it('should not have errored', () => {
277+
expect(data.errored).toEqual(false)
278+
})
279+
280+
it('should not have any warnings', () => {
281+
expect(data.results[0].warnings.length).toEqual(0)
282+
})
283+
})
262284
})

0 commit comments

Comments
 (0)