Skip to content

Commit

Permalink
docs: Fix typos (#2102)
Browse files Browse the repository at this point in the history
Found via `typos --hidden --format brief`
  • Loading branch information
kianmeng authored Jul 18, 2024
1 parent f20a6a1 commit 3c6a11f
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions js/releases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ class Releases {
* rewrite: false, // preprocess sourcemaps before uploading
* sourceMapReference: true, // add a source map reference to source files
* dedupe: true, // deduplicate already uploaded files
* stripPrefix: [], // remove certain prefices from filenames
* stripCommonPrefix: false, // guess common prefices to remove from filenames
* stripPrefix: [], // remove certain prefixes from filenames
* stripCommonPrefix: false, // guess common prefixes to remove from filenames
* validate: false, // validate source maps and cancel the upload on error
* urlPrefix: '', // add a prefix source map urls after stripping them
* urlSuffix: '', // add a suffix source map urls after stripping them
Expand All @@ -159,7 +159,7 @@ class Releases {
async uploadSourceMaps(release, options) {
if (!options || !options.include || !Array.isArray(options.include)) {
throw new Error(
'`options.include` must be a vaild array of paths and/or path descriptor objects.'
'`options.include` must be a valid array of paths and/or path descriptor objects.'
);
}

Expand Down Expand Up @@ -246,7 +246,7 @@ class Releases {
*/
async newDeploy(release, options) {
if (!options || !options.env) {
throw new Error('options.env must be a vaild name');
throw new Error('options.env must be a valid name');
}
const args = ['releases', 'deploys', release, 'new'];
return this.execute(helper.prepareCommand(args, DEPLOYS_SCHEMA, options), null);
Expand Down
10 changes: 5 additions & 5 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ impl<'a> AuthenticatedApi<'a> {
self.api.put(path, body)
}

/// Convinience method to call self.api.request.
/// Convenience method to call self.api.request.
fn request(&self, method: Method, url: &str) -> ApiResult<ApiRequest> {
self.api.request(method, url, None)
}
Expand Down Expand Up @@ -496,15 +496,15 @@ impl<'a> AuthenticatedApi<'a> {
)
};

let mut checkums_qs = String::new();
let mut checksums_qs = String::new();
for checksum in checksums.iter() {
checkums_qs.push_str(&format!("&checksum={}", QueryArg(checksum)));
checksums_qs.push_str(&format!("&checksum={}", QueryArg(checksum)));
}
// We have a 16kb buffer for reach request configured in nginx,
// so do not even bother trying if it's too long.
// (16_384 limit still leaves us with 384 bytes for the url itself).
if !checkums_qs.is_empty() && checkums_qs.len() <= 16_000 {
path.push_str(&checkums_qs);
if !checksums_qs.is_empty() && checksums_qs.len() <= 16_000 {
path.push_str(&checksums_qs);
}

let resp = self.get(&path)?;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/sourcemaps/explain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn fetch_release_artifacts(org: &str, project: &str, release: &str) -> Result<Ve
}

// Try to find an artifact which matches the path part of the url extracted from the stacktrace frame,
// prefixed with the default `~/`, which is a "glob-like" pattern for matchin any hostname.
// prefixed with the default `~/`, which is a "glob-like" pattern for matching any hostname.
fn find_matching_artifact(artifacts: &[Artifact], path: &str) -> Result<Artifact> {
let full_match = artifacts.iter().find(|a| a.name == path);
let partial_match = artifacts
Expand Down Expand Up @@ -348,7 +348,7 @@ fn resolve_sourcemap_url(abs_path: &str, sourcemap_location: &str) -> Result<Str
.map_err(|e| e.into())
}

// Unify url to be prefixed with the default `~/`, which is a "glob-like" pattern for matchin any hostname.
// Unify url to be prefixed with the default `~/`, which is a "glob-like" pattern for matching any hostname.
//
// We only need the `pathname` portion of the url, so if it's absolute, just extract it.
// If it's relative however, parse any random url (example.com) and join it with our relative url,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ pub fn upload_chunks(
// The upload is executed in parallel batches. Each batch aggregates objects
// until it exceeds the maximum size configured in ChunkUploadOptions. We
// keep track of the overall progress and potential errors. If an error
// ocurrs, all subsequent requests will be cancelled and the error returned.
// occurs, all subsequent requests will be cancelled and the error returned.
// Otherwise, the after every successful update, the overall progress is
// updated and rendered.
let batches: Vec<_> = chunks
Expand Down
4 changes: 2 additions & 2 deletions src/utils/dif_upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ impl<'a> DifSource<'a> {
/// file name.
fn get_relative_fs(base: &Path, path: &Path) -> Option<ByteView<'static>> {
// Use parent() to get to the directory and then move relative from
// there. ByteView will internally cannonicalize the path and resolve
// there. ByteView will internally canonicalize the path and resolve
// symlinks.
base.parent()
.and_then(|p| ByteView::open(p.join(path)).ok())
Expand Down Expand Up @@ -896,7 +896,7 @@ fn collect_object_dif<'a>(

// Invoke logic to retrieve attachments specific to the kind
// of object file. These are used for processing. Since only
// dSYMs equire processing currently, all other kinds are
// dSYMs require processing currently, all other kinds are
// skipped.
let attachments = match object.file_format() {
FileFormat::MachO => find_uuid_plists(&object, &mut source),
Expand Down
4 changes: 2 additions & 2 deletions src/utils/file_upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub struct SourceFile {
pub path: PathBuf,
pub contents: Vec<u8>,
pub ty: SourceFileType,
/// A map of headers attatched to the source file.
/// A map of headers attached to the source file.
///
/// Headers that `sentry-cli` knows about are
/// * "debug-id" for a file's debug id
Expand Down Expand Up @@ -199,7 +199,7 @@ impl<'a> FileUpload<'a> {
}

// Do not permit uploads of more than 20k files if the server does not
// support artifact bundles. This is a termporary downside protection to
// support artifact bundles. This is a temporary downside protection to
// protect users from uploading more sources than we support.
if self.files.len() > 20_000 {
bail!(
Expand Down
2 changes: 1 addition & 1 deletion src/utils/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub fn parse_link_header(s: &str) -> Vec<HashMap<&str, &str>> {
rv
}

/// Checkes whether an url starts with http:// or https:// prefix
/// Checks whether an url starts with http:// or https:// prefix
pub fn is_absolute_url(url: &str) -> bool {
url.starts_with("http://") || url.starts_with("https://")
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ pub fn load_dotenv() -> DotenvResult<()> {
}
.map_or_else(
|error| {
// We only propogate errors if the .env file was found and failed to load.
// We only propagate errors if the .env file was found and failed to load.
if error.not_found() {
Ok(())
} else {
Expand Down

0 comments on commit 3c6a11f

Please sign in to comment.