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

Commit d82b739

Browse files
committed
4.0.0
1 parent 4e87315 commit d82b739

11 files changed

+93
-70
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
dist
12
node_modules
2-
index.*.*
33
package-lock.json
44
*.log*
55
*.result.css
66
.*
77
!.editorconfig
8+
!.gitattributes
89
!.gitignore
910
!.rollup.js
1011
!.tape.js

.rollup.js

+7-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
import babel from 'rollup-plugin-babel';
1+
import pkg from './package.json'
22

33
export default {
4-
input: 'index.js',
5-
output: [
6-
{ file: 'index.cjs.js', format: 'cjs', sourcemap: true },
7-
{ file: 'index.es.mjs', format: 'es', sourcemap: true }
8-
],
9-
plugins: [
10-
babel({
11-
presets: [
12-
['@babel/env', { modules: false, targets: { node: 6 } }]
13-
]
14-
})
15-
]
16-
};
4+
...pkg.rollup,
5+
plugins: pkg.rollup.plugins.map(plugin => require(plugin)()),
6+
onwarn(warning, warn) {
7+
if (warning.code !== 'UNRESOLVED_IMPORT') warn(warning)
8+
}
9+
}

.tape.js

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
module.exports = {
2-
'postcss-focus-within': {
3-
'basic': {
4-
message: 'supports basic usage'
5-
},
6-
'basic:replacewith': {
7-
message: 'supports { replaceWith: ".focus-within" } usage',
8-
options: {
9-
replaceWith: '.focus-within'
10-
}
11-
},
12-
'basic:preserve': {
13-
message: 'supports { preserve: false } usage',
14-
options: {
15-
preserve: false
16-
}
2+
'basic': {
3+
message: 'supports basic usage'
4+
},
5+
'basic:replacewith': {
6+
message: 'supports { replaceWith: ".focus-within" } usage',
7+
options: {
8+
replaceWith: '.focus-within'
9+
}
10+
},
11+
'basic:preserve': {
12+
message: 'supports { preserve: false } usage',
13+
options: {
14+
preserve: false
1715
}
1816
}
1917
};

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
language: node_js
44

55
node_js:
6-
- 6
6+
- 10
77

88
install:
99
- npm install --ignore-scripts

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changes to PostCSS Focus Within
22

3+
### 4.0.0 (April 20, 2020)
4+
5+
- Fixed: Allow `:focus-within` to appear escaped in a selector
6+
- Updated: Support for Node 10+
7+
- Updated: Ownership moved to CSS Tools
8+
39
### 3.0.0 (September 17, 2018)
410

511
- Updated: Support for PostCSS v7+

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ scope and avoid unrelated commits.
2626
cd postcss-focus-within
2727

2828
# Assign the original repo to a remote called "upstream"
29-
git remote add upstream git@github.com:jonathantneal/postcss-focus-within.git
29+
git remote add upstream git@github.com:csstools/postcss-focus-within.git
3030

3131
# Install the tools necessary for testing
3232
npm install

INSTALL.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,6 @@ grunt.initConfig({
165165
[PostCSS]: https://github.com/postcss/postcss
166166
[PostCSS CLI]: https://github.com/postcss/postcss-cli
167167
[PostCSS Loader]: https://github.com/postcss/postcss-loader
168-
[PostCSS]: https://github.com/jonathantneal/postcss-focus-within
168+
[PostCSS]: https://github.com/csstools/postcss-focus-within
169169
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
170170
[React App Rewired]: https://github.com/timarney/react-app-rewired

README.md

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# PostCSS Focus Within [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
22

3-
[![NPM Version][npm-img]][npm-url]
4-
[![CSS Standard Status][css-img]][css-url]
5-
[![Build Status][cli-img]][cli-url]
6-
[![Gitter Chat][git-img]][git-url]
3+
[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-focus-within.svg" height="20">][npm-url]
4+
[<img alt="CSS Standard Status" src="https://cssdb.org/badge/focus-within-pseudo-class.svg" height="20">][css-url]
5+
[<img alt="build status" src="https://img.shields.io/travis/csstools/postcss-focus-within/master.svg" height="20">][cli-url]
6+
[<img alt="support chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url]
77

88
[PostCSS Focus Within] lets you use the `:focus-within` pseudo-class in CSS,
99
following the [Selectors Level 4 specification].
@@ -115,19 +115,15 @@ focusWithin({ replaceWith: '.focus-within' });
115115
}
116116
```
117117

118-
[css-img]: https://cssdb.org/badge/focus-within-pseudo-class.svg
119118
[css-url]: https://cssdb.org/#focus-within-pseudo-class
120-
[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-focus-within.svg
121-
[cli-url]: https://travis-ci.org/jonathantneal/postcss-focus-within
122-
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
119+
[cli-url]: https://travis-ci.org/csstools/postcss-focus-within
123120
[git-url]: https://gitter.im/postcss/postcss
124-
[npm-img]: https://img.shields.io/npm/v/postcss-focus-within.svg
125121
[npm-url]: https://www.npmjs.com/package/postcss-focus-within
126122

127-
[focus-within polyfill]: https://github.com/jonathantneal/focus-within
123+
[focus-within polyfill]: https://github.com/jsxtools/focus-within
128124
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
129125
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
130126
[PostCSS]: https://github.com/postcss/postcss
131-
[PostCSS Focus Within]: https://github.com/jonathantneal/postcss-focus-within
127+
[PostCSS Focus Within]: https://github.com/csstools/postcss-focus-within
132128
[PostCSS Loader]: https://github.com/postcss/postcss-loader
133129
[Selectors Level 4 specification]: https://www.w3.org/TR/selectors-4/#the-focus-within-pseudo

package.json

+54-26
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,76 @@
11
{
22
"name": "postcss-focus-within",
3-
"version": "3.0.0",
3+
"version": "4.0.0",
44
"description": "Use the :focus-within pseudo-selector in CSS",
55
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
66
"license": "CC0-1.0",
7-
"repository": "jonathantneal/postcss-focus-within",
8-
"homepage": "https://github.com/jonathantneal/postcss-focus-within#readme",
9-
"bugs": "https://github.com/jonathantneal/postcss-focus-within/issues",
10-
"main": "index.cjs.js",
11-
"module": "index.es.mjs",
7+
"repository": "csstools/postcss-focus-within",
8+
"homepage": "https://github.com/csstools/postcss-focus-within#readme",
9+
"bugs": "https://github.com/csstools/postcss-focus-within/issues",
10+
"main": "dist/index.cjs.js",
11+
"module": "dist/index.esm.mjs",
1212
"files": [
13-
"index.cjs.js",
14-
"index.cjs.js.map",
15-
"index.es.mjs",
16-
"index.es.mjs.map"
13+
"dist"
1714
],
1815
"scripts": {
19-
"prepublishOnly": "npm test",
20-
"pretest": "rollup -c .rollup.js --silent",
21-
"test": "echo 'Running tests...'; npm run test:js && npm run test:tape",
22-
"test:js": "eslint *.js --cache --ignore-path .gitignore --quiet",
23-
"test:tape": "postcss-tape"
16+
"build": "npx rollup -c .rollup.js",
17+
"build:watch": "npx rollup -c .rollup.js --watch",
18+
"lint": "npx eslint --cache src",
19+
"lint:fix": "npx eslint --cache --fix",
20+
"pretest": "npm install && npm run build",
21+
"test": "npm run lint && npm run tape",
22+
"tape": "npx postcss-tape"
2423
},
2524
"engines": {
26-
"node": ">=6.0.0"
25+
"node": ">=10.0.0"
2726
},
2827
"dependencies": {
29-
"postcss": "^7.0.2"
28+
"postcss": "^7.0.27"
3029
},
3130
"devDependencies": {
32-
"@babel/core": "^7.0.0",
33-
"@babel/preset-env": "^7.0.0",
34-
"babel-eslint": "^9.0.0",
35-
"eslint": "^5.6.0",
36-
"eslint-config-dev": "2.0.0",
37-
"postcss-tape": "2.2.0",
31+
"@babel/core": "^7.9.0",
32+
"@babel/preset-env": "^7.9.5",
33+
"babel-eslint": "^10.1.0",
34+
"eslint": "^6.8.0",
35+
"postcss-tape": "5.0.2",
3836
"pre-commit": "^1.2.2",
39-
"rollup": "^0.66.0",
40-
"rollup-plugin-babel": "^4.0.1"
37+
"rollup": "^2.6.1",
38+
"rollup-plugin-babel": "^4.4.0"
39+
},
40+
"babel": {
41+
"presets": [
42+
[
43+
"@babel/env",
44+
{
45+
"targets": "maintained node versions"
46+
}
47+
]
48+
]
4149
},
4250
"eslintConfig": {
43-
"extends": "dev",
51+
"env": {
52+
"es6": true,
53+
"node": true
54+
},
55+
"extends": "eslint:recommended",
4456
"parser": "babel-eslint"
4557
},
58+
"rollup": {
59+
"input": "src/index.js",
60+
"plugins": [
61+
"rollup-plugin-babel"
62+
],
63+
"output": [
64+
{
65+
"file": "dist/index.cjs.js",
66+
"format": "cjs"
67+
},
68+
{
69+
"file": "dist/index.esm.js",
70+
"format": "esm"
71+
}
72+
]
73+
},
4674
"keywords": [
4775
"postcss",
4876
"css",

index.js renamed to src/index.js

File renamed without changes.

0 commit comments

Comments
 (0)