-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(verify): allow query parameters on imports (raw css etc)
- Loading branch information
Showing
22 changed files
with
225 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
some license |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# some cool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use strict' | ||
|
||
Object.defineProperty(exports, '__esModule', { | ||
value: true, | ||
}) | ||
exports.default = void 0 | ||
|
||
var _react = _interopRequireDefault(require('react')) | ||
|
||
var _two = _interopRequireDefault(require('./two')) | ||
|
||
var _one = _interopRequireDefault(require('./styles/one.css?raw')) | ||
|
||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : {default: obj} | ||
} | ||
|
||
class One extends _react.default.PureComponent { | ||
componentDidMount() { | ||
;(0, _two.default)() | ||
} | ||
|
||
render() { | ||
return /*#__PURE__*/ _react.default.createElement( | ||
'button', | ||
{ | ||
className: _one.default.button, | ||
}, | ||
'Click me' | ||
) | ||
} | ||
} | ||
|
||
exports.default = One |
3 changes: 3 additions & 0 deletions
3
test/fixtures/verify/css-raw-import-missing/lib/styles/One.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.button { | ||
background: #bf1942; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function two() { | ||
// do something important | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "sanity-plugin-css-part", | ||
"version": "1.0.0", | ||
"private": true, | ||
"description": "Just a fixture", | ||
"main": "./lib/one.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [ | ||
"sanity", | ||
"sanity-plugin" | ||
], | ||
"peerDependencies": { | ||
"react": "*" | ||
}, | ||
"author": "Some person", | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"paths": { | ||
"source": "./src", | ||
"compiled": "./lib" | ||
}, | ||
|
||
"parts": [ | ||
{ | ||
"name": "part:css-part/some/thing", | ||
"path": "one.js" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react' | ||
import two from './two' | ||
import styles from './styles/one.css?raw' | ||
|
||
export default class One extends React.PureComponent { | ||
componentDidMount() { | ||
two() | ||
} | ||
|
||
render() { | ||
return <button className={styles.button}>Click me</button> | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
test/fixtures/verify/css-raw-import-missing/src/styles/One.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.button { | ||
background: #bf1942; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function two() { | ||
// do something important | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
some license |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# some cool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use strict' | ||
|
||
Object.defineProperty(exports, '__esModule', { | ||
value: true, | ||
}) | ||
exports.default = void 0 | ||
|
||
var _react = _interopRequireDefault(require('react')) | ||
|
||
var _two = _interopRequireDefault(require('./two')) | ||
|
||
var _one = _interopRequireDefault(require('./styles/One.css?raw')) | ||
|
||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : {default: obj} | ||
} | ||
|
||
class One extends _react.default.PureComponent { | ||
componentDidMount() { | ||
;(0, _two.default)() | ||
} | ||
|
||
render() { | ||
return /*#__PURE__*/ _react.default.createElement( | ||
'button', | ||
{ | ||
className: _one.default.button, | ||
}, | ||
'Click me' | ||
) | ||
} | ||
} | ||
|
||
exports.default = One |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.button { | ||
background: #bf1942; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function two() { | ||
// do something important | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "sanity-plugin-css-part", | ||
"version": "1.0.0", | ||
"private": true, | ||
"description": "Just a fixture", | ||
"main": "./lib/one.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [ | ||
"sanity", | ||
"sanity-plugin" | ||
], | ||
"peerDependencies": { | ||
"react": "*" | ||
}, | ||
"author": "Some person", | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"paths": { | ||
"source": "./src", | ||
"compiled": "./lib" | ||
}, | ||
|
||
"parts": [ | ||
{ | ||
"name": "part:css-part/some/thing", | ||
"path": "one.js" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react' | ||
import two from './two' | ||
import styles from './styles/One.css?raw' | ||
|
||
export default class One extends React.PureComponent { | ||
componentDidMount() { | ||
two() | ||
} | ||
|
||
render() { | ||
return <button className={styles.button}>Click me</button> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.button { | ||
background: #bf1942; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function two() { | ||
// do something important | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters