This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "oxc-biome-formatter" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
biome_formatter = "0.5.7" | |
biome_text_size = "0.5.7" | |
oxc_allocator = "0.36.0" | |
oxc_ast = "0.36.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/language-js/comments/handle-comments.js b/src/language-js/comments/handle-comments.js | |
index ec6bfe4b9..0accdb29b 100644 | |
--- a/src/language-js/comments/handle-comments.js | |
+++ b/src/language-js/comments/handle-comments.js | |
@@ -202,15 +202,15 @@ function handleIfStatementComments({ | |
if (precedingNode.type === "BlockStatement") { | |
addTrailingComment(precedingNode, comment); | |
} else { | |
- const isSingleLineComment = | |
- isLineComment(comment) || |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "oxc_regular_expression_wasm" | |
version = "0.0.1" | |
publish = false | |
authors.workspace = true | |
description.workspace = true | |
edition.workspace = true | |
homepage.workspace = true | |
keywords.workspace = true | |
license.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { format, __debug } from "./standalone.js"; | |
import * as meriyahPlugin from "./src/plugins/meriyah.js"; | |
import * as oxcPlugin from "./src/plugins/oxc.js"; | |
import * as estreePlugin from "./src/plugins/estree.js"; | |
const plugins = [estreePlugin, meriyahPlugin, oxcPlugin]; | |
const source = ` | |
// 1 | |
let a | |
= 42 // 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "oxc-jsdoc" | |
version = "0.1.0" | |
edition = "2021" | |
# Latest version is 0.14.0, but could not compile... | |
[dependencies] | |
oxc_allocator = "0.12.5" | |
oxc_parser = "0.12.5" | |
oxc_span = "0.12.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-check | |
/** | |
* | 課税所得 | 税率 | 控除額 | | |
* | ---------------------------------- | ---- | ----------- | | |
* | 1,000円 から 1,949,000円まで | 5% | 0円 | | |
* | 1,950,000円 から 3,299,000円まで | 10% | 97,500円 | | |
* | 3,300,000円 から 6,949,000円まで | 20% | 427,500円 | | |
* | 6,950,000円 から 8,999,000円まで | 23% | 636,000円 | | |
* | 9,000,000円 から 17,999,000円まで | 33% | 1,536,000円 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arrayBufferToHex(arrayBuffer) { | |
const view = new Uint8Array(arrayBuffer); | |
let result = ""; | |
for (let i = 0; i < view.length; i++) { | |
const value = view[i].toString(16); | |
result += value.length === 1 ? "0" + value : value; | |
} | |
return result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ = window.OpenSeadragon; | |
$.TileSource = class extends $.TileSource { | |
downloadTileStart(context) { | |
// 👼 Keep original code as is | |
var dataStore = context.userData, | |
image = new Image(); | |
dataStore.image = image; | |
dataStore.request = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ID_BYTES = 8; // 64 bits | |
const HEADER_BYTE_LENGTH = 2 * Uint16Array.BYTES_PER_ELEMENT; | |
// OpenAI embeddings are [-1, 1), so we can | |
// quantize to Int16 by multiplying by 2^15 | |
const QUANTIZE_MAX = Math.pow(2, 15); | |
export class VectorCollection { | |
static VERSION = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const promiseAllWithConcurrency = async <T>( | |
queue: (() => Promise<T>)[], | |
concurrency: number = 1 | |
) => { | |
let index = 0; | |
const results: T[] = []; | |
const execThread = async () => { | |
while (index < queue.length) { | |
const curIndex = index++; |
NewerOlder