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

chore: various typos #491

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module.exports = {
// Disallow empty destructuring
"no-empty-pattern": "error",

// Disallow eval and setInteral/setTimeout with strings
// Disallow eval and setInterval/setTimeout with strings
"no-eval": "error",

// No assigning to exception variable
Expand All @@ -113,7 +113,7 @@ module.exports = {
// No overwriting defined functions
"no-func-assign": "error",

// Disallow eval and setInteral/setTimeout with strings
// Disallow eval and setInterval/setTimeout with strings
"no-implied-eval": "error",

// No invalid regular expressions
Expand Down Expand Up @@ -156,7 +156,7 @@ module.exports = {
// Use {} instead of new Object()
"no-new-object": "error",

// Dissallow use of new wrappers
// Disallow use of new wrappers
"no-new-wrappers": "error",

// No Math() or JSON()
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ This is a library to generate and consume the source map format

## Use with Node

$ npm install source-map
```shell
npm install source-map
```

## Use on the Web

Expand Down Expand Up @@ -241,10 +243,10 @@ following attributes:
- `file`: Optional. The generated filename this source map is associated with.

- `x_google_ignoreList`: Optional. An additional extension field which is an array
of indices refering to urls in the sources array. This is used to identify third-party
of indices referring to urls in the sources array. This is used to identify third-party
sources, that the developer might want to avoid when debugging. [Read more](https://developer.chrome.com/articles/x-google-ignore-list/)

The promise of the constructed souce map consumer is returned.
The promise of the constructed source map consumer is returned.

When the `SourceMapConsumer` will no longer be used anymore, you must call its
`destroy` method.
Expand All @@ -261,7 +263,7 @@ to call `destroy`.
#### SourceMapConsumer.with

Construct a new `SourceMapConsumer` from `rawSourceMap` and `sourceMapUrl`
(see the `SourceMapConsumer` constructor for details. Then, invoke the `async function f(SourceMapConsumer) -> T` with the newly constructed consumer, wait
(see the `SourceMapConsumer` constructor for details). Then, invoke the `async function f(SourceMapConsumer) -> T` with the newly constructed consumer, wait
for `f` to complete, call `destroy` on the consumer, and return `f`'s return
value.

Expand Down
2 changes: 1 addition & 1 deletion bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This directory contains helpers for benchmarking the `mozilla/source-map`
library.

Ensure that you have built the library, as these benchmarks rely on
`dist/source-map.js`. See the main README.md for detais on building.
`dist/source-map.js`. See the main README.md for details on building.

Run a local webserver from the root of the repository:

Expand Down
2 changes: 1 addition & 1 deletion bench/plot.r
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jitterBoxPlot <- function(data, operation, titleText) {
largeData <- subset(data, Mappings.Size==14964446)

jitterBoxPlot(largeData, "set.first.breakpoint", "Set First Breakpoint")
jitterBoxPlot(largeData, "subsequent.setting.breakpoints", "Subsquent Setting Breakpoints")
jitterBoxPlot(largeData, "subsequent.setting.breakpoints", "Subsequent Setting Breakpoints")

jitterBoxPlot(largeData, "first.pause.at.exception", "First Pause at Exception")
jitterBoxPlot(largeData, "subsequent.pausing.at.exceptions", "Subsequent Pausing at Exceptions")
Expand Down
2 changes: 1 addition & 1 deletion bench/self-source-map.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to leave this file untouched, as it's only used for benchmarking. Also, I can't even spot what the changes here are.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a find/replace for minimium/minimum like in a few of the other files

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/source-map-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class SourceMapGenerator {
* Applies the mappings of a sub-source-map for a specific source file to the
* source map being generated. Each mapping to the supplied source file is
* rewritten using the supplied source map. Note: The resolution for the
* resulting mappings is the minimium of this map and the supplied map.
* resulting mappings is the minimum of this map and the supplied map.
*
* @param aSourceMapConsumer The source map to be applied.
* @param aSourceFile Optional. The filename of the source file.
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
// must behave as "some-dir/some-path.js".
//
// With this library's the transition to a more URL-focused implementation, that behavior is
// preserved here. To acheive that, we trim the "/" from absolute-path when a sourceRoot value
// preserved here. To achieve that, we trim the "/" from absolute-path when a sourceRoot value
// is present in order to make the sources entries behave as if they are relative to the
// "sourceRoot", as they would have if the two strings were simply concated.
if (sourceRoot && getURLType(sourceURL) === "path-absolute") {
Expand Down
2 changes: 1 addition & 1 deletion source-map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export class SourceMapGenerator {
* Applies the mappings of a sub-source-map for a specific source file to the
* source map being generated. Each mapping to the supplied source file is
* rewritten using the supplied source map. Note: The resolution for the
* resulting mappings is the minimium of this map and the supplied map.
* resulting mappings is the minimum of this map and the supplied map.
*
* @param sourceMapConsumer The source map to be applied.
* @param sourceFile Optional. The filename of the source file.
Expand Down
2 changes: 1 addition & 1 deletion test/test-source-map-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ exports["test setting sourcesContent to null when already null"] = function (
});
};

exports["test applySourceMap with unexact match"] = async function (assert) {
exports["test applySourceMap with inexact match"] = async function (assert) {
const map1 = new SourceMapGenerator({
file: "bundled-source",
});
Expand Down