Skip to content

Commit

Permalink
v0.64.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tophf committed Jan 4, 2025
1 parent b2a7946 commit 435b412
Show file tree
Hide file tree
Showing 10 changed files with 4,545 additions and 1,348 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,21 @@
name: Node.js Package

on:
workflow_dispatch:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: '>=18'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm install
- run: npm run ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
22 changes: 9 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
name: ci
on: [push, pull_request]
on:
push:
branches: ['*']
pull_request:

jobs:
test:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
node: ['14']

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
node-version: '>=18'
- run: npm install
- run: npm run build-test
- run: npm test
- run: npm run ci
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Desktop.ini
# Mac crap
.DS_Store

test/cases
test/cases/
14 changes: 10 additions & 4 deletions build-test-cases.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import fetch from "make-fetch-happen";
import decompress from "decompress";
import fs from 'fs';
import decompress from 'decompress';

const r = await fetch("https://github.com/stylus/stylus/archive/dev.zip");
const b = await r.buffer();
const DIR = "test/cases";
const URL = "https://github.com/stylus/stylus/archive/dev.zip";

fs.rmSync(DIR, {recursive: true, force: true});
console.log(`Fetching tests from ${URL}...`);

const b = Buffer.from(await (await fetch(URL)).arrayBuffer());
const files = await decompress(b, "test/cases", {
filter: file => /test[\\/]cases[\\/][^\\/]+$/.test(file.path),
map: file => {
file.path = file.path.split(/cases[\\/]/)[1] || file.path;
return file;
}
});
console.log("Tests created.");
13 changes: 7 additions & 6 deletions dist/stylus-renderer.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/stylus-renderer.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 435b412

Please sign in to comment.