Skip to content

Commit

Permalink
8.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Jun 10, 2019
1 parent 2f04d18 commit 7c11ae7
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto eol=lf
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,6 +5,7 @@ package-lock.json
*.result.css
.*
!.editorconfig
!.gitattributes
!.gitignore
!.rollup.js
!.tape.js
Expand Down
18 changes: 13 additions & 5 deletions .rollup.js
Expand Up @@ -7,25 +7,33 @@ export default {
{ file: 'index.esm.mjs', format: 'esm', sourcemap: true, strict: false }
],
plugins: [
patchBabelPluginSyntaxImportMeta(),
babel({
plugins: [
['@babel/plugin-syntax-import-meta']
],
presets: [
['@babel/preset-env', { modules: false, targets: { node: 8 } }]
]
}),
patchBabelPluginSyntaxImportMeta()
})
]
};

function patchBabelPluginSyntaxImportMeta () {
return {
name: 'patch-babel-plugin-syntax-import-meta',
renderChunk (code) {
const requireMatch = /new \(require\('u' \+ 'rl'\)\.URL\)/;
renderChunk (code, chunk, options) {
const currentUrlMatch = /var url = require\('url'\);([\W\w]+)const currentURL[^\n]+\nconst currentFilename[^\n]+/;

return code.replace(requireMatch, 'new url.URL');
const shouldTransformImportMeta = options.format === 'cjs' && currentUrlMatch.test(code);

if (shouldTransformImportMeta) {
const updatedCode = code.replace(currentUrlMatch, '$1const currentFilename = __filename;');

return updatedCode;
}

return null;
}
};
}
5 changes: 5 additions & 0 deletions .travis.yml
Expand Up @@ -2,6 +2,11 @@

language: node_js

os:
- windows
- linux
- osx

node_js:
- 8

Expand Down
12 changes: 9 additions & 3 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# Changes to PostCSS Normalize

### 8.0.1 (June 10, 2019)

- Fixed: Issue with Windows failing to resolve normalize
- Updated: `browserslist` to 4.6.2 (patch)
- Updated: `postcss` to 7.0.17 (patch)

### 8.0.0 (June 3, 2019)

- Added: `sanitize.css` 10.0.0 (major)
Expand Down Expand Up @@ -27,9 +33,9 @@ versions of PostCSS to use PostCSS Normalize. This update resolves that.

### 5.0.0 (June 7, 2018)

- Update `browserslist` to v3.2.8 (major)
- Update: `postcss` to v6.0.22 (patch)
- Update: Node support from v4 to v6 (major)
- Update `browserslist` to 3.2.8 (major)
- Update: `postcss` to 6.0.22 (patch)
- Update: Node support from v4 to 6 (major)

### 4.0.0 (June 21, 2017)

Expand Down
8 changes: 4 additions & 4 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "postcss-normalize",
"version": "8.0.0",
"version": "8.0.1",
"description": "Use the parts of normalize.css or sanitize.css you need from your browserslist",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "CC0-1.0",
Expand Down Expand Up @@ -28,8 +28,8 @@
},
"dependencies": {
"@csstools/normalize.css": "^10.1.0",
"browserslist": "^4.6.1",
"postcss": "^7.0.16",
"browserslist": "^4.6.2",
"postcss": "^7.0.17",
"postcss-browser-comments": "^3.0.0",
"sanitize.css": "^10.0.0"
},
Expand All @@ -42,7 +42,7 @@
"postcss-import": "^12.0.1",
"postcss-tape": "^5.0.0",
"pre-commit": "^1.2.2",
"rollup": "^1.13.1",
"rollup": "^1.14.6",
"rollup-plugin-babel": "^4.3.2"
},
"eslintConfig": {
Expand Down

0 comments on commit 7c11ae7

Please sign in to comment.