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

Bump flake.lock and related dependencies #78

Merged
merged 19 commits into from
Feb 8, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
branches: [main]
pull_request:
paths:
- '**'
workflow_dispatch:

defaults:
run:
Expand All @@ -18,11 +21,11 @@ jobs:
# dprint and typos check twice in their actions and last our task, but the speed is acceptable :zap:
- uses: dprint/check@v2.2
with:
dprint-version: '0.43.0' # selfup { "regex": "\\d[^']+", "script": "dprint --version | cut -d ' ' -f 2" }
- uses: crate-ci/typos@v1.16.24 # selfup { "regex": "\\d\\.\\d+\\.\\d+", "script": "typos --version | cut -d ' ' -f 2" }
dprint-version: '0.45.0' # selfup { "regex": "\\d[^']+", "script": "dprint --version | cut -d ' ' -f 2" }
- uses: crate-ci/typos@v1.16.25 # selfup { "regex": "\\d\\.\\d+\\.\\d+", "script": "typos --version | cut -d ' ' -f 2" }
- uses: denoland/setup-deno@v1
with:
deno-version: '1.38.5' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
deno-version: '1.40.2' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
- run: deno task check
build:
timeout-minutes: 15
Expand All @@ -31,14 +34,14 @@ jobs:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: '1.38.5' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
deno-version: '1.40.2' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
- name: Ensure cache before build
run: deno task cache
- name: Install gh-action-escape
run: curl -fsSL https://raw.githubusercontent.com/kachick/gh-action-escape/v0.2.0/scripts/install-in-github-action.sh | sh -s v0.2.0
- name: Build
id: build
run: deno task build | gh-action-escape -name=report | tee --append "$GITHUB_OUTPUT"
run: deno task build 2>/dev/null | gh-action-escape -name=report 2>/dev/null | tee --append "$GITHUB_OUTPUT"
- name: Upload the product for nightly use and debug
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: '1.38.5' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
deno-version: '1.40.2' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
- name: Ensure cache before build
run: deno task cache
- name: Install gh-action-escape
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stylelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: '1.38.5' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
deno-version: '1.40.2' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
- run: deno task stylelint
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tasks": {
"build": "deno run --allow-net --cached-only --allow-read --allow-write --allow-env scripts/build.ts",
"build": "deno run --quiet --allow-net --cached-only --allow-read --allow-write --allow-env scripts/build.ts",
"clean": "rm -rf ./dist",
"check": "dprint check && typos && deno fmt --check && deno lint && deno check src/*.ts* scripts/*.ts && deno task check:manifest",
"check:manifest": "deno run scripts/manifestValidator.ts",
Expand Down
517 changes: 327 additions & 190 deletions deno.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions scripts/build.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { toHashString } from 'https://deno.land/std@0.193.0/crypto/to_hash_string.ts';
import { encodeHex } from 'https://deno.land/std@0.215.0/encoding/hex.ts';
import {
basename,
extname,
join,
} from 'https://deno.land/std@0.193.0/path/posix.ts';
import manifestJson from '../src/manifest.json' assert {
} from 'https://deno.land/std@0.215.0/path/mod.ts';
import manifestJson from '../src/manifest.json' with {
type: 'json',
};
import manifestSchema from '../src/manifestSchemaAdjusted.json' assert {
import manifestSchema from '../src/manifestSchemaAdjusted.json' with {
type: 'json',
};
import { assertEquals } from 'https://deno.land/std@0.193.0/testing/asserts.ts';
import { assertEquals } from 'https://deno.land/std@0.215.0/testing/asserts.ts';
// Always require --allow-net https://github.com/denoland/deno_emit/issues/81
import { bundle } from 'https://deno.land/x/emit@0.24.0/mod.ts';
import { bundle } from 'https://deno.land/x/emit@0.35.0/mod.ts';
Copy link
Owner

Choose a reason for hiding this comment

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

🤷 I don't know why needed the updating dependency in build scrips...

Maybe emit? denoland/deno_emit@0.24.0...0.35.0

// @deno-types="https://cdn.skypack.dev/-/fflate@v0.8.0-9lwslwAa54POmYjLobRf/dist=es2019,mode=raw/lib/index.d.ts"
import * as fflate from 'https://cdn.skypack.dev/fflate@0.8.0?min';
import Ajv from 'https://esm.sh/v128/ajv@8.12.0';
Expand Down Expand Up @@ -69,7 +69,7 @@ const zipStructure = new Map<

const sha256 = async (content: Uint8Array) => {
const digest = await crypto.subtle.digest('SHA-256', content);
return toHashString(digest);
return encodeHex(digest);
};

for (const path of getOrderedPathList('dist')) {
Expand Down Expand Up @@ -133,7 +133,7 @@ const validateProduct = async (zipped: Uint8Array) => {
const [ok, errors] = await validateProduct(zipped);

if (ok) {
console.log(
Deno.stdout.writeSync(new TextEncoder().encode(
JSON.stringify(
{
productPath,
Expand All @@ -146,7 +146,7 @@ if (ok) {
undefined,
4,
),
);
));
} else {
console.error(errors);
Deno.exit(1);
Expand Down
4 changes: 2 additions & 2 deletions scripts/manifestValidator.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Ajv from 'https://esm.sh/v128/ajv@8.12.0';
// Do not include from https://json.schemastore.org/chrome-manifest, current official stored has wrong definitions
// See https://github.com/SchemaStore/schemastore/issues/2861 for further detail
import manifestSchema from '../src/manifestSchemaAdjusted.json' assert {
import manifestSchema from '../src/manifestSchemaAdjusted.json' with {
type: 'json',
};
import manifestJson from '../src/manifest.json' assert {
import manifestJson from '../src/manifest.json' with {
type: 'json',
};

Expand Down
6 changes: 3 additions & 3 deletions src/github-patcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ chrome.storage.sync.get([
]).then((keys): void => {
if (keys.isHideExploreRepositories) {
const exploreRepositoriesComponent = document.querySelector(
'div[aria-label=\'Explore repositories\']',
"div[aria-label='Explore repositories']",
);

if (exploreRepositoriesComponent) {
Expand All @@ -24,7 +24,7 @@ chrome.storage.sync.get([

if (keys.isHideSponsors) {
const sponsorsH2Node = document.evaluate(
'/html/body//div[@class=\'Layout-sidebar\']//h2[text()=\'Sponsors\']',
"/html/body//div[@class='Layout-sidebar']//h2[text()='Sponsors']",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
Expand All @@ -40,7 +40,7 @@ chrome.storage.sync.get([
});

const highlightsH2Node = document.evaluate(
'/html/body//div[@class=\'Layout-sidebar\']//h2[text()=\'Highlights\']',
"/html/body//div[@class='Layout-sidebar']//h2[text()='Highlights']",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
Expand Down