Compare commits
17 Commits
498601b81a
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 80e43303c6 | |||
| de548917c5 | |||
| aa471228fe | |||
| c6419bd084 | |||
| a2f574acc1 | |||
| e9d4547d7e | |||
| 396e472c0d | |||
| 5f9db435c2 | |||
| 4ef2d7a6cc | |||
| c4af91c99f | |||
| 3ec6498da5 | |||
| 04b5b312ea | |||
| 20a2188ee2 | |||
| 7b3ec98d69 | |||
| 081cf28d81 | |||
| 4c97522b0f | |||
| 30070f7f9c |
@@ -6,6 +6,7 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- action.yml
|
||||
- dist/**
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -13,14 +14,14 @@ jobs:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Increment tag
|
||||
id: tag
|
||||
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@e393dbb067c09fd43519392572ccf63b66cba92d # 0.1.39
|
||||
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@3ab82e6aa1db388a34562f5ce6eedb598651d916 # 0.1.42
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@29f50ea246d5d9a62ac3c611fa5c8a6e9846df5a # 0.2.8
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@3f772d0a80a510b0f06762be110276c9c8a7b7b8 # 0.2.12
|
||||
with:
|
||||
tag: ${{ steps.tag.outputs.new-tag }}
|
||||
|
||||
@@ -8,27 +8,23 @@ jobs:
|
||||
name: Dry-Run
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Validate Renovate Config
|
||||
uses: ./
|
||||
with:
|
||||
json-file: renovate.json
|
||||
- name: Validate oxfmt config
|
||||
uses: ./
|
||||
with:
|
||||
json-file: .oxfmtrc.json
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: Cache dependencies
|
||||
id: cache-deps
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
@@ -47,13 +43,13 @@ jobs:
|
||||
name: Check Dist
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: Cache dependencies
|
||||
id: cache-deps
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
|
||||
@@ -8,15 +8,15 @@ jobs:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Increment tag
|
||||
id: tag
|
||||
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@e393dbb067c09fd43519392572ccf63b66cba92d # 0.1.39
|
||||
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@3ab82e6aa1db388a34562f5ce6eedb598651d916 # 0.1.42
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
prerelease: true
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@29f50ea246d5d9a62ac3c611fa5c8a6e9846df5a # 0.2.8
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@3f772d0a80a510b0f06762be110276c9c8a7b7b8 # 0.2.12
|
||||
with:
|
||||
tag: ${{ steps.tag.outputs.new-tag }}
|
||||
|
||||
Vendored
+26
-10
@@ -6647,7 +6647,8 @@ var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
this.once("connect", cb);
|
||||
}
|
||||
[kDispatch](opts, handler) {
|
||||
const request = new Request(opts.origin || this[kUrl].origin, opts, handler);
|
||||
const origin = opts.origin || this[kUrl].origin;
|
||||
const request = new Request(origin, opts, handler);
|
||||
this[kQueue].push(request);
|
||||
if (this[kResuming]) {} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {
|
||||
this[kResuming] = 1;
|
||||
@@ -8945,7 +8946,10 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true);
|
||||
if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`);
|
||||
matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers));
|
||||
if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}' on path '${resolvedPath}'`);
|
||||
if (matchedMockDispatches.length === 0) {
|
||||
const headers = typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers;
|
||||
throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`);
|
||||
}
|
||||
return matchedMockDispatches[0];
|
||||
}
|
||||
function addMockDispatch(mockDispatches, key, data) {
|
||||
@@ -10264,7 +10268,8 @@ var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
static json(data, init = {}) {
|
||||
webidl.argumentLengthCheck(arguments, 1, "Response.json");
|
||||
if (init !== null) init = webidl.converters.ResponseInit(init);
|
||||
const body = extractBody(textEncoder.encode(serializeJavascriptValueToJSONString(data)));
|
||||
const bytes = textEncoder.encode(serializeJavascriptValueToJSONString(data));
|
||||
const body = extractBody(bytes);
|
||||
const responseObject = fromInnerResponse(makeResponse({}), "response");
|
||||
initializeResponse(responseObject, init, {
|
||||
body: body[0],
|
||||
@@ -11233,7 +11238,8 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
taskDestination = request.client.globalObject;
|
||||
crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability;
|
||||
}
|
||||
const timingInfo = createOpaqueTimingInfo({ startTime: coarsenedSharedCurrentTime(crossOriginIsolatedCapability) });
|
||||
const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability);
|
||||
const timingInfo = createOpaqueTimingInfo({ startTime: currentTime });
|
||||
const fetchParams = {
|
||||
controller: new Fetch(dispatcher),
|
||||
request,
|
||||
@@ -11341,7 +11347,8 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
response.headersList.set("content-type", type, true);
|
||||
} else {
|
||||
response.rangeRequested = true;
|
||||
const rangeValue = simpleRangeHeaderValue(request.headersList.get("range", true), true);
|
||||
const rangeHeader = request.headersList.get("range", true);
|
||||
const rangeValue = simpleRangeHeaderValue(rangeHeader, true);
|
||||
if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL"));
|
||||
let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue;
|
||||
if (rangeStart === null) {
|
||||
@@ -11364,7 +11371,8 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
case "data:": {
|
||||
const dataURLStruct = dataURLProcessor(requestCurrentURL(request));
|
||||
const currentURL = requestCurrentURL(request);
|
||||
const dataURLStruct = dataURLProcessor(currentURL);
|
||||
if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL"));
|
||||
const mimeType = serializeAMimeType(dataURLStruct.mimeType);
|
||||
return Promise.resolve(makeResponse({
|
||||
@@ -12723,8 +12731,10 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
});
|
||||
const clonedResponse = cloneResponse(innerResponse);
|
||||
const bodyReadPromise = createDeferredPromise();
|
||||
if (innerResponse.body != null) readAllBytes(innerResponse.body.stream.getReader()).then(bodyReadPromise.resolve, bodyReadPromise.reject);
|
||||
else bodyReadPromise.resolve(void 0);
|
||||
if (innerResponse.body != null) {
|
||||
const reader = innerResponse.body.stream.getReader();
|
||||
readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject);
|
||||
} else bodyReadPromise.resolve(void 0);
|
||||
/** @type {CacheBatchOperation[]} */
|
||||
const operations = [];
|
||||
/** @type {CacheBatchOperation} */
|
||||
@@ -13016,7 +13026,10 @@ var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
request = webidl.converters.RequestInfo(request);
|
||||
options = webidl.converters.MultiCacheQueryOptions(options);
|
||||
if (options.cacheName != null) {
|
||||
if (this.#caches.has(options.cacheName)) return await new Cache(kConstruct, this.#caches.get(options.cacheName)).match(request, options);
|
||||
if (this.#caches.has(options.cacheName)) {
|
||||
const cacheList = this.#caches.get(options.cacheName);
|
||||
return await new Cache(kConstruct, cacheList).match(request, options);
|
||||
}
|
||||
} else for (const cacheList of this.#caches.values()) {
|
||||
const response = await new Cache(kConstruct, cacheList).match(request, options);
|
||||
if (response !== void 0) return response;
|
||||
@@ -13044,7 +13057,10 @@ var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
const prefix = "CacheStorage.open";
|
||||
webidl.argumentLengthCheck(arguments, 1, prefix);
|
||||
cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName");
|
||||
if (this.#caches.has(cacheName)) return new Cache(kConstruct, this.#caches.get(cacheName));
|
||||
if (this.#caches.has(cacheName)) {
|
||||
const cache = this.#caches.get(cacheName);
|
||||
return new Cache(kConstruct, cache);
|
||||
}
|
||||
const cache = [];
|
||||
this.#caches.set(cacheName, cache);
|
||||
return new Cache(kConstruct, cache);
|
||||
|
||||
Generated
+965
-221
File diff suppressed because it is too large
Load Diff
+6
-6
@@ -15,11 +15,11 @@
|
||||
"ajv": "8.20.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "24.13.2",
|
||||
"@vitest/coverage-v8": "4.1.9",
|
||||
"oxfmt": "0.56.0",
|
||||
"rolldown": "1.1.3",
|
||||
"typescript": "6.0.3",
|
||||
"vitest": "4.1.9"
|
||||
"@types/node": "24.13.3",
|
||||
"@vitest/coverage-v8": "4.1.10",
|
||||
"oxfmt": "0.60.0",
|
||||
"rolldown": "1.2.0",
|
||||
"typescript": "7.0.2",
|
||||
"vitest": "4.1.10"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ describe("validateJson()", () => {
|
||||
despiteThisBeingValidJson: "toString() breaks it, making it invalid",
|
||||
}.toString();
|
||||
await expect(validateJson(jsonFile)).rejects.toThrow(
|
||||
'"[object Object]" is not valid JSON'
|
||||
'"[object Object]" is not valid JSON',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -40,7 +40,7 @@ describe("validateJson()", () => {
|
||||
validJson: true,
|
||||
});
|
||||
await expect(validateJson(jsonFile)).rejects.toThrow(
|
||||
"No schema found in JSON file."
|
||||
"No schema found in JSON file.",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -48,7 +48,7 @@ describe("validateJson()", () => {
|
||||
vi.mocked(fetch).mockRejectedValue(new Error("Failed to fetch schema"));
|
||||
const jsonFile = JSON.stringify({ $schema: "http://t00n.de/404.json" });
|
||||
await expect(validateJson(jsonFile)).rejects.toThrow(
|
||||
"Failed to fetch schema"
|
||||
"Failed to fetch schema",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -61,15 +61,15 @@ describe("validateJson()", () => {
|
||||
({
|
||||
despiteThisBeingValidJson:
|
||||
"toString() breaks it, making it invalid",
|
||||
}.toString()),
|
||||
}
|
||||
}).toString(),
|
||||
},
|
||||
);
|
||||
|
||||
const jsonFile = JSON.stringify({
|
||||
$schema: "https://json-schema.org/draft-07/schema",
|
||||
});
|
||||
await expect(validateJson(jsonFile)).rejects.toThrow(
|
||||
'"[object Object]" is not valid JSON'
|
||||
'"[object Object]" is not valid JSON',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -79,7 +79,7 @@ describe("validateJson()", () => {
|
||||
{
|
||||
ok: true,
|
||||
text: async () => validSchema,
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const jsonFile = JSON.stringify({
|
||||
@@ -87,7 +87,7 @@ describe("validateJson()", () => {
|
||||
notTheExpectedField: 42,
|
||||
});
|
||||
await expect(validateJson(jsonFile)).rejects.toThrow(
|
||||
"JSON file is not valid: No errors"
|
||||
"JSON file is not valid: No errors",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -97,7 +97,7 @@ describe("validateJson()", () => {
|
||||
{
|
||||
ok: true,
|
||||
text: async () => validSchema,
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const jsonFile = JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user