Skip to content

Commit

Permalink
Back to node 16 until Netlify fixes their build system.
Browse files Browse the repository at this point in the history
  • Loading branch information
qubyte committed Apr 30, 2022
1 parent 670cfb9 commit 15c05f2
Show file tree
Hide file tree
Showing 11 changed files with 144 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@main
- name: use node 18
- name: use node 16
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 16.x
- run: npm ci
- run: npm test
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-scheduled-posts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@main
- name: use node 18
- name: use node 16
uses: actions/setup-node@v3
with:
node-version: '18.x'
node-version: '16.x'
- run: npm ci
- name: publish scheduled
env:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
16
2 changes: 1 addition & 1 deletion functions/function-helpers/check-auth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetch } from 'undici';
import fetch from 'node-fetch';

export async function checkAuth(headers) {
if (headers['short-circuit-auth']) {
Expand Down
2 changes: 1 addition & 1 deletion functions/function-helpers/upload.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetch } from 'undici';
import fetch from 'node-fetch';

export async function upload(message, type, filename, buffer) {
const body = JSON.stringify({ message, content: buffer.toString('base64') });
Expand Down
145 changes: 129 additions & 16 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"license": "AGPL-3.0-only",
"private": true,
"engines": {
"node": "18.x"
"node": "16.x"
},
"dependencies": {
"busboy": "1.6.0",
Expand All @@ -32,15 +32,15 @@
"jsdom": "19.0.0",
"marked": "^4.0.14",
"mathjax-full": "^3.1.4",
"node-fetch": "3.2.4",
"p-retry": "5.1.0",
"postcss": "8.4.12",
"postcss-calc": "8.2.4",
"postcss-custom-properties": "12.1.7",
"postcss-import": "^14.1.0",
"sharp": "0.30.4",
"slugify": "1.6.5",
"twitter-lite": "^1.1.0",
"undici": "5.0.0"
"twitter-lite": "^1.1.0"
},
"devDependencies": {
"@toisu/static": "4.0.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { readFile } from 'node:fs/promises';
import { pathToFileURL } from 'node:url';
import { fetch } from 'undici';
import fetch from 'node-fetch';
import linkHeader from 'http-link-header';
import { JSDOM } from 'jsdom';

Expand Down
5 changes: 2 additions & 3 deletions plugins/fetch-old-feed-to-urls.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Readable } from 'node:stream';
import { fetch } from 'undici';
import fetch from 'node-fetch';
import retry from 'p-retry';
import parseFeedToUrls from './parse-feed-to-urls.js';

Expand All @@ -10,7 +9,7 @@ async function fetchOldFeed(url) {
throw new Error(`Unexpected response from ${url}: ${res.status} ${await res.text()}`);
}

return parseFeedToUrls(Readable.fromWeb(res.body));
return parseFeedToUrls(res.body);
}

export default function (url) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/tweet-new-blog-posts/get-tags-for-url.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetch } from 'undici';
import fetch from 'node-fetch';
import { JSDOM } from 'jsdom';

export default async function getTagsForUrl(url) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-scheduled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import fs from 'node:fs/promises';
import { parseFrontMatter } from '../lib/load-post-files.js';
import retry from 'p-retry';
import { fetch } from 'undici';
import fetch from 'node-fetch';

const LAST_BUILD_URL = 'https://qubyte.codes/last-build.txt';
const POST_FILES_DIR = new URL('../content/posts/', import.meta.url);
Expand Down

0 comments on commit 15c05f2

Please sign in to comment.