Skip to content

Commit f7480af

Browse files
Fixing test for createGenerateId
1 parent 5c8657a commit f7480af

File tree

10 files changed

+16
-10
lines changed

10 files changed

+16
-10
lines changed

packages/jss-plugin-isolate/src/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import expect from 'expect.js'
22
import {create, sheets} from 'jss'
33

44
import nested from 'jss-plugin-nested'
5-
import isolate from './index'
5+
import isolate from '.'
66

77
describe('jss-plugin-isolate', () => {
88
let jss

packages/jss/.size-snapshot.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
22
"jss.js": {
3-
"bundled": 63661,
3+
"bundled": 63710,
44
"minified": 23308,
55
"gzipped": 7131
66
},
77
"jss.min.js": {
8-
"bundled": 62274,
8+
"bundled": 62323,
99
"minified": 22543,
1010
"gzipped": 6771
1111
},
1212
"jss.cjs.js": {
13-
"bundled": 59388,
13+
"bundled": 59435,
1414
"minified": 26209,
1515
"gzipped": 7211
1616
},
1717
"jss.esm.mjs": {
18-
"bundled": 57800,
18+
"bundled": 57847,
1919
"minified": 24937,
2020
"gzipped": 7040,
2121
"treeshaked": {

packages/jss/src/RuleList.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @flow
22
import createRule from './utils/createRule'
3-
import {StyleRule, KeyframesRule} from './plugins'
3+
/* eslint-disable-next-line import/no-cycle */
4+
import {StyleRule, KeyframesRule} from './plugins/index'
45
import type {
56
RuleListOptions,
67
ToCssOptions,

packages/jss/src/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface MinimalObservable<T> {
1111
): {unsubscribe: () => void}
1212
}
1313

14-
type Func<P, T, R> = T extends undefined ? ((data: P) => R) : ((data: P & {theme: T}) => R)
14+
type Func<P, T, R> = T extends undefined ? (data: P) => R : (data: P & {theme: T}) => R
1515

1616
type NormalCssProperties = CSSProperties<string | number>
1717
type NormalCssValues<K> = K extends keyof NormalCssProperties ? NormalCssProperties[K] : JssValue

packages/jss/src/plugins/conditionalRule.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// @flow
2+
/* eslint-disable-next-line import/no-cycle */
23
import RuleList from '../RuleList'
34
import type {CSSMediaRule, Rule, RuleOptions, ToCssOptions, JssStyle, ContainerRule} from '../types'
45

packages/jss/src/plugins/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// @flow
2+
/* eslint-disable-next-line import/no-cycle */
23
import pluginStyleRule, {StyleRule} from './styleRule'
4+
/* eslint-disable-next-line import/no-cycle */
35
import pluginConditionalRule, {ConditionalRule} from './conditionalRule'
6+
/* eslint-disable-next-line import/no-cycle */
47
import pluginKeyframesRule, {KeyframesRule} from './keyframesRule'
58
import pluginKeyframeRule, {KeyframeRule} from './keyframeRule'
69
import pluginFontFaceRule, {FontFaceRule} from './fontFaceRule'

packages/jss/src/plugins/keyframesRule.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// @flow
22
import warning from 'tiny-warning'
3+
/* eslint-disable-next-line import/no-cycle */
34
import RuleList from '../RuleList'
45
import type {
56
CSSKeyframesRule,

packages/jss/tests/unit/createGenerateId.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const sheetMock = {
1313

1414
describe('Unit: jss - createGenerateId', () => {
1515
beforeEach(() => {
16-
resetModuleId()
1716
resetSheets()
17+
resetModuleId()
1818
})
1919

2020
it('should return a function', () => {

scripts/update-changelog.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const fs = require('fs')
22
const path = require('path')
33
const log = require('npmlog/log')
44

5-
const lerna = require('../lerna')
5+
const lerna = require('../lerna.json')
66
const {CHANGELOG_FILENAME} = require('./constants')
77

88
const changelogPath = path.join(process.cwd(), CHANGELOG_FILENAME)

tests/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {sheets as defaultSheets} from '../packages/jss/src'
22
import {setVersion} from '../packages/jss/src/utils/moduleId'
33

44
export function resetModuleId() {
5-
setVersion(-1)
5+
setVersion(0)
66
}
77

88
export function resetSheets(sheets = defaultSheets) {

0 commit comments

Comments
 (0)