Skip to content

Commit

Permalink
Merge pull request #1515 from 7rulnik/main
Browse files Browse the repository at this point in the history
Use source-map-js (source-map's fork)
  • Loading branch information
ai committed May 17, 2021
2 parents 631cf49 + b111207 commit 9ac31e8
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/map-generator.js
@@ -1,8 +1,8 @@
'use strict'

let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
let { dirname, resolve, relative, sep } = require('path')
let { pathToFileURL } = require('url')
let { SourceMapConsumer, SourceMapGenerator } = require('source-map')

let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)
let pathAvailable = Boolean(dirname && resolve && relative && sep)
Expand Down
2 changes: 1 addition & 1 deletion lib/postcss.d.ts
@@ -1,4 +1,4 @@
import { SourceMapGenerator, RawSourceMap } from 'source-map'
import { SourceMapGenerator, RawSourceMap } from 'source-map-js'

import Node, {
Position,
Expand Down
2 changes: 1 addition & 1 deletion lib/previous-map.d.ts
@@ -1,4 +1,4 @@
import { SourceMapConsumer } from 'source-map'
import { SourceMapConsumer } from 'source-map-js'

import { ProcessOptions } from './postcss.js'

Expand Down
2 changes: 1 addition & 1 deletion lib/previous-map.js
@@ -1,8 +1,8 @@
'use strict'

let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
let { existsSync, readFileSync } = require('fs')
let { dirname, join } = require('path')
let { SourceMapConsumer, SourceMapGenerator } = require('source-map')

function fromBase64(str) {
if (Buffer) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -66,7 +66,7 @@
"dependencies": {
"colorette": "^1.2.2",
"nanoid": "^3.1.23",
"source-map": "^0.6.1"
"source-map-js": "^0.6.2"
},
"devDependencies": {
"@logux/eslint-config": "^45.4.3",
Expand Down
2 changes: 1 addition & 1 deletion test/lazy-result.test.ts
@@ -1,4 +1,4 @@
import mozilla from 'source-map'
import mozilla from 'source-map-js'

import LazyResult from '../lib/lazy-result.js'
import Processor from '../lib/processor.js'
Expand Down
2 changes: 1 addition & 1 deletion test/map.test.ts
@@ -1,4 +1,4 @@
import { SourceMapConsumer, SourceMapGenerator } from 'source-map'
import { SourceMapConsumer, SourceMapGenerator } from 'source-map-js'
import { removeSync, outputFileSync } from 'fs-extra'
import { join, resolve, parse } from 'path'
import { existsSync } from 'fs'
Expand Down
2 changes: 1 addition & 1 deletion test/previous-map.test.ts
@@ -1,5 +1,5 @@
import { removeSync, outputFileSync } from 'fs-extra'
import { SourceMapConsumer } from 'source-map'
import { SourceMapConsumer } from 'source-map-js'
import { pathToFileURL } from 'url'
import { existsSync } from 'fs'
import { join } from 'path'
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -6574,6 +6574,11 @@ source-list-map@^2.0.0:
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==

source-map-js@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e"
integrity sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==

source-map-resolve@^0.5.0:
version "0.5.3"
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
Expand Down

0 comments on commit 9ac31e8

Please sign in to comment.