Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use source-map-js (source-map's fork) #1515

Merged
merged 4 commits into from May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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