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 and reduce dependencies #171

Draft
wants to merge 49 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
2912214
chore: regenerate package lock
doamatto Jul 23, 2023
263c15b
fix: email and website for self
doamatto Jul 23, 2023
5ee1741
deps: add missing dep for buildtime
doamatto Jul 23, 2023
2574062
deps: swap to maintained version of gulp-compile-handlebars
doamatto Aug 6, 2023
e4816e2
chore: add npm run build to make builds marginally easier
doamatto Aug 6, 2023
07abdee
deps: regenerate package lock
doamatto Aug 6, 2023
35ae248
chore: start migration to latest of a17t
doamatto Aug 6, 2023
e9dfa7e
chore: move Axios and JSSoup to devDependencies
doamatto Aug 6, 2023
acf0ed2
fix: ran self-check npm test (npm audit fix)
doamatto Apr 20, 2024
90c2136
chore: bump axios to 0.28.1
doamatto Apr 20, 2024
edf0096
chore: bump axios to latest (1.6.8)
doamatto Apr 20, 2024
9190309
fix: bump timeout from 10ms to 10000ms/10s
doamatto Apr 20, 2024
9f1e597
fix: found out where the rest of the package lockfile went, err well …
doamatto Apr 20, 2024
c570e89
chore: bump node version for GH action
doamatto Apr 20, 2024
7c6a5d2
chore: update some Babel deps to latest
doamatto Aug 21, 2024
b8d99e4
chore: move Jest to devdep
doamatto Aug 21, 2024
5488ec6
chore: update typings deps
doamatto Aug 21, 2024
a659e69
chore: move eslint to develop
doamatto Aug 21, 2024
ec26f4b
chore: swap out handlebars-helpers
doamatto Aug 21, 2024
a1be018
deps: bump
doamatto Jan 10, 2025
10cb611
chore: use `npx` for gulp-cli
doamatto Jan 10, 2025
4955097
fix: use of HBS helpers
doamatto Jan 10, 2025
98fef9e
Merge branch 'master' into bump-deps
doamatto Jan 10, 2025
7fd6110
chore(deps): finish migration away from helpers/handlebars-helpers
doamatto Jan 15, 2025
71e9ccc
chore: use node:fs, node:path for `clean` gulp task instead of `del` pkg
doamatto Jan 15, 2025
2755a1d
deps: bump
doamatto Jan 15, 2025
fc1458a
chore: remove comments for formerly not-made packages
doamatto Jan 15, 2025
a299a7c
deps: bump all hbl-* packages
doamatto Jan 20, 2025
8a307f0
deps: bump several dependencies, remove dotenv dependency
doamatto Jan 20, 2025
6f3fc0f
chore: replace gulp-rename with homebrew solution
doamatto Jan 20, 2025
776b2f6
deps: remove gulp-rename
doamatto Jan 20, 2025
10732c8
deps: remove gulp-jest, bumps
doamatto Jan 20, 2025
cc78d67
chore: pin Ubuntu to squelch build warning
doamatto Jan 20, 2025
0277807
chore: bump setup-node, remove actions/cache in favour of
doamatto Jan 20, 2025
1df3203
deps: bump and remove fluff from ESLint, TypeScript-ESLint, Prettier
doamatto Jan 20, 2025
afffb6e
fix: remove unused vars
doamatto Jan 20, 2025
13e6059
chore: squelch error from legacy codebase
doamatto Jan 20, 2025
7d70ea9
fix: use unused vars for error catching/reporting
doamatto Jan 20, 2025
8815a52
deps: remove Babel (was unused)
doamatto Jan 20, 2025
11f35ee
chore: move Gulp tasks for SCSS transpile, moving assets to esbuild
doamatto Jan 22, 2025
080c292
fix: add missing fs, path imports
doamatto Jan 22, 2025
c3cad72
chore: rename css.ts -> scss.ts
doamatto Jan 22, 2025
3d637e3
fix: callback is not function
doamatto Jan 26, 2025
2c98280
fix: Jest tests, the return of Babel
doamatto Jan 26, 2025
b7ae2ce
chore: partial revert of 11f35eed37c437fc32ecc692acbb84e620e6cd4a
doamatto Jan 26, 2025
a9e948e
fix: move PostCSS config into gulpfile
doamatto Jan 26, 2025
2402f10
deps: bump Node version for test workflow
doamatto Jan 26, 2025
794defe
chore: set NVM to 22 (for Netlify)
doamatto Jan 26, 2025
f693de0
deps: bump
doamatto Feb 1, 2025
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
16 changes: 0 additions & 16 deletions .eslintrc.js

This file was deleted.

17 changes: 4 additions & 13 deletions .github/workflows/browserslist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,19 @@ permissions:
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Configure git
run: |
# Setup for commiting using built-in token. See https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1
- name: "Install Node 22 and cache NPM packages"
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm install
- name: Update Browserslist database and create PR if applies
uses: c2corg/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Cache node modules
Expand All @@ -18,7 +18,7 @@ jobs:
${{ runner.os }}-
- uses: actions/setup-node@v1
with:
node-version: '12'
node-version: '22'
- run: npm install
- run: echo "::add-matcher::.github/problem_matcher.json"
- run: npm test
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
4 changes: 2 additions & 2 deletions CONTRIBUTORS.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ role = "founder"

[doamatto]
name = "Matt Ronchetto"
website = "https://www.doamatto.xyz"
website = "https://maatt.fr"
github = "doamatto"
email = "[email protected]"
email = "[email protected]"

[kulchynska]

Expand Down
13 changes: 3 additions & 10 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
module.exports = {
presets: [
[
"@babel/preset-env",
{
targets: {
node: "current",
},
},
],
"@babel/preset-typescript",
],
["@babel/preset-env", {targets: {node: "current"}}],
"@babel/preset-typescript"
]
};
26 changes: 26 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// @ts-check

import eslint from '@eslint/js';
import globals from 'globals';
import prettierConfig from 'eslint-config-prettier';
import tsEslint from 'typescript-eslint';

export default tsEslint.config(
eslint.configs.recommended,
tsEslint.configs.recommended,
prettierConfig,
{
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.node
},
sourceType: "module"
},
rules: {
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-require-imports": 0,
"@typescript-eslint/no-unused-vars": 1,
}
}
);
52 changes: 40 additions & 12 deletions gulpfile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require("dotenv").config();

import { Product, RubricQuestion, Contributor } from "./src/parsing/types";

import {
Expand All @@ -15,18 +13,23 @@ import {
getExtensionAPI,
} from "./src/build/utils";

import * as purgecss from "@fullhuman/postcss-purgecss";

const gulp = require("gulp");
const postcss = require("gulp-postcss");
const rename = require("gulp-rename");
const del = require("del");
const fs = require("fs");
const fs = require("node:fs");
const path = require("node:path");
const through = require("through2");

const rubric: RubricQuestion[] = loadRubric();
const contributors: Contributor[] = loadContributors();
const products: Product[] = loadProducts(rubric, contributors);

gulp.task("clean", () => {
return del("./dist/**/*");
gulp.task("clean", async () => {
return fs.rmSync(path.join(__dirname, "dist"), {
recursive: true,
force: true,
});
});

gulp.task("build api", async () => {
Expand Down Expand Up @@ -70,7 +73,12 @@ gulp.task("build general pages", () => {
"./src/templates/pages/directory.hbs",
],
})
.pipe(rename({ extname: ".html" }))
.pipe(through.obj((file, _, cb) => { // change to .html extension
if (file.isBuffer()) {
file.path = file.path.replace(".hbs", ".html")
}
cb(null, file);
}))
.pipe(hbsFactory({ rubric, contributors, products }))
.pipe(gulp.dest("./dist/"));
});
Expand Down Expand Up @@ -109,11 +117,31 @@ gulp.task("collect product icons", () => {
return gulp.src(["./icons/**/*"]).pipe(gulp.dest("./dist/static/icons/"));
});

gulp.task("build css", () => {
gulp.task("build css", async () => {
const purgecssConf = purgecss.default({
content: ["./src/**/*.hbs", "./src/**/*.js", "./src/**/*.ts", "./gulpfile.ts"],
defaultExtractor: (content) => content.match(/[\w-/:]+(?<!:)/g) || [],
});
const plugins = [
require("postcss-import"),
require("tailwindcss")("tailwind.config.js"),
require("autoprefixer"),
...(process.env.NODE_ENV === "production" ? [purgecssConf] : []),
];

return gulp
.src(["./src/static/css/base.scss"])
.pipe(postcss())
.pipe(rename({ extname: ".css" }))
.pipe(postcss(plugins, {
syntax: require("postcss-scss")
}))
.on("error", (err) => console.error(err))
.pipe(through.obj((file, _, cb) => { // change to .css extension
if (file.isBuffer()) {
file.path = file.path.replace(".scss", ".css")
}
cb(null, file);
}))
.on("error", (err) => console.error(err))
.pipe(gulp.dest("./dist/static/css/"));
});

Expand All @@ -126,7 +154,7 @@ gulp.task(
"collect static",
"collect product icons",
"collect root favicon",
"build css",
"build css"
])
);

Expand Down
Loading
Loading