Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: reworkcss/css
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5b0e0cdf93fc820ed61858466aa9f70496b6e9b7
Choose a base ref
...
head repository: reworkcss/css
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 838d0719889780c85ad1f7e4534df3daa2fb2f8d
Choose a head ref
  • 4 commits
  • 3 files changed
  • 3 contributors

Commits on Sep 4, 2018

  1. Upgrade dependencies (#115)

    cone56 authored and SlexAxton committed Sep 4, 2018
    Copy the full SHA
    042922e View commit details
  2. 2.2.4

    SlexAxton committed Sep 4, 2018
    Copy the full SHA
    64910e8 View commit details

Commits on Jul 2, 2020

  1. Update/remove dependencies (#140)

    * feat: update dependencies
    
    * test: don't bail when there is a failure
    
    * feat: remove urix
    
    * fix: remove lock file, not needed
    
    * fix: don't use const
    
    * fix: add const back
    
    * test: using latest node version with travis
    kboedges authored Jul 2, 2020
    Copy the full SHA
    c0aa45c View commit details
  2. Bump major version since we updated major version deps and bumped the…

    … node version by a mile
    SlexAxton committed Jul 2, 2020
    Copy the full SHA
    838d071 View commit details
Showing with 20 additions and 14 deletions.
  1. +1 −1 .travis.yml
  2. +10 −3 lib/stringify/source-map-support.js
  3. +9 −10 package.json
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: node_js
node_js:
- "0.10"
- "12.18.2"
13 changes: 10 additions & 3 deletions lib/stringify/source-map-support.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
var SourceMap = require('source-map').SourceMapGenerator;
var SourceMapConsumer = require('source-map').SourceMapConsumer;
var sourceMapResolve = require('source-map-resolve');
var urix = require('urix');
var fs = require('fs');
var path = require('path');

@@ -16,6 +15,14 @@ var path = require('path');

module.exports = mixin;

/**
* Ensure Windows-style paths are formatted properly
*/

const makeFriendlyPath = function(aPath) {
return path.sep === "\\" ? aPath.replace(/\\/g, "/").replace(/^[a-z]:\/?/i, "/") : aPath;
}

/**
* Mixin source map support into `compiler`.
*
@@ -56,7 +63,7 @@ exports.updatePosition = function(str) {

exports.emit = function(str, pos) {
if (pos) {
var sourceFile = urix(pos.source || 'source.css');
var sourceFile = makeFriendlyPath(pos.source || 'source.css');

this.map.addMapping({
source: sourceFile,
@@ -107,7 +114,7 @@ exports.applySourceMaps = function() {
if (originalMap) {
var map = new SourceMapConsumer(originalMap.map);
var relativeTo = originalMap.sourcesRelativeTo;
this.map.applySourceMap(map, file, urix(path.dirname(relativeTo)));
this.map.applySourceMap(map, file, makeFriendlyPath(path.dirname(relativeTo)));
}
}
}, this);
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "css",
"version": "2.2.3",
"version": "3.0.0",
"description": "CSS parser / stringifier",
"main": "index",
"files": [
@@ -9,20 +9,19 @@
"Readme.md"
],
"dependencies": {
"inherits": "^2.0.1",
"source-map": "^0.1.38",
"source-map-resolve": "^0.5.1",
"urix": "^0.1.0"
"inherits": "^2.0.4",
"source-map": "^0.6.1",
"source-map-resolve": "^0.6.0"
},
"devDependencies": {
"mocha": "^1.21.3",
"should": "^4.0.4",
"matcha": "^0.5.0",
"bytes": "^1.0.0"
"mocha": "^8.0.1",
"should": "^13.2.3",
"matcha": "^0.7.0",
"bytes": "^3.1.0"
},
"scripts": {
"benchmark": "matcha",
"test": "mocha --require should --reporter spec --bail test/*.js"
"test": "mocha --require should --reporter spec test/*.js"
},
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"license": "MIT",