forked from Mirror/attic-action
add prettier config
This commit is contained in:
parent
5f106d5966
commit
16bd754a82
7 changed files with 75 additions and 79 deletions
4
.prettierrc
Normal file
4
.prettierrc
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"useTabs": true,
|
||||
"printWidth": 120
|
||||
}
|
|
@ -11,7 +11,7 @@ export const install = async () => {
|
|||
|
||||
core.info("Installing attic");
|
||||
const installScript = await fetch(
|
||||
"https://raw.githubusercontent.com/zhaofengli/attic/main/.github/install-attic-ci.sh"
|
||||
"https://raw.githubusercontent.com/zhaofengli/attic/main/.github/install-attic-ci.sh",
|
||||
).then((r) => {
|
||||
if (!r.ok) {
|
||||
core.setFailed(`Action failed with error: ${r.statusText}`);
|
||||
|
|
|
@ -18,11 +18,7 @@ export const push = async () => {
|
|||
const addedPaths = newPaths
|
||||
.filter((p) => !oldPaths.includes(p))
|
||||
.filter(
|
||||
(p) =>
|
||||
!p.endsWith(".drv") &&
|
||||
!p.endsWith(".drv.chroot") &&
|
||||
!p.endsWith(".check") &&
|
||||
!p.endsWith(".lock")
|
||||
(p) => !p.endsWith(".drv") && !p.endsWith(".drv.chroot") && !p.endsWith(".check") && !p.endsWith(".lock"),
|
||||
);
|
||||
|
||||
await exec("attic", ["push", cache, ...addedPaths]);
|
||||
|
|
|
@ -4,11 +4,7 @@ import { Writable } from "node:stream";
|
|||
class StringStream extends Writable {
|
||||
chunks: Buffer[] = [];
|
||||
|
||||
_write(
|
||||
chunk: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
|
||||
_enc: unknown,
|
||||
next: () => unknown
|
||||
) {
|
||||
_write(chunk: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, _enc: unknown, next: () => unknown) {
|
||||
this.chunks.push(Buffer.from(chunk));
|
||||
next();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue