jhnns
Repos
126
Followers
762
Following
36

Easy monkey-patching for node.js unit tests

3021
118

A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

61881
8127

Update outdated npm modules with zero pain™

2228
34

Compiles Sass to CSS

3809
397

Compiles Less to CSS

924
190

Haskell experiments

1
0

Events

started
Created at 2 weeks ago
Created at 2 weeks ago

Remove node_modules and update dependencies

Add node_modules to gitignore

Add example

Created at 2 weeks ago

Fix test script

chore: Update packages

  • form-data -> ^4.0.0
  • node-fetch -> ^3.2.10

BREAKING CHANGE: This is potentially breaking if any of the upstream packages removed support for a specific Node version

Add linting script

Created at 1 month ago

chore: Add nvmrc

chore: Update dependencies

Created at 1 month ago
issue comment
Pnpm support

Sounds good 👍 . How would that feature look like? :)

Created at 1 month ago
Created at 1 month ago
opened issue
Error when parsing Mobx

Environment

npm ls
├── @babel/core@7.18.13
├── @linaria/babel-preset@4.1.2
├── @linaria/core@4.1.1
├── @linaria/webpack-loader@4.1.2
├── babel-loader@8.2.5
├── webpack-cli@4.10.0
└── webpack@5.74.0
node -v
v16.13.1

On macOS Monterey

Description

When I tried to update to the latest Linaria version, I ran into a strange parsing bug. Originally it failed on dist/mobx.esm.js from the popular MobX library.

I've boiled down the code to the following example:

// main.js
import { css } from "@linaria/core";
import { b } from "./mobx.js";

css``;
// mobx.js
var _;

var a = void _;

function b(b) {
  void _;
}

export { a, b };

When trying to parse this, it will fail with:

ERROR in ./src/main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/jhnns/dev/jhnns/linaria-bug-repo/src/main.js: /Users/jhnns/dev/jhnns/linaria-bug-repo/src/mobx.js: Exporting local "b", which is not declared.
  7 | }
  8 |
> 9 | export { a, b };
    |             ^

Could be a Babel bug, but since it only happens in conjunction with Linaria I guess this is the right place to start 😁

Reproducible Demo

The example is pretty small and simple:

https://github.com/jhnns/linaria-bug-repo

Created at 1 month ago

Boil down example

Created at 1 month ago

Clarify node version

Created at 1 month ago
create branch
jhnns create branch main
Created at 1 month ago
create repository
jhnns create repository
Created at 1 month ago
jhnns delete branch leomelzer-patch-1
Created at 1 month ago
[Security] Workflow nodejs.yml is using vulnerable action actions/checkout

The workflow nodejs.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability. The vulnerability fix that is missing by actions version could be related to: (1) CVE fix (2) upgrade of vulnerable dependency (3) fix to secret leak and others. Please consider to update the reference to the action.

Created at 1 month ago
[Security] Workflow nodejs.yml is using vulnerable action actions/checkout

The workflow nodejs.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability. The vulnerability fix that is missing by actions version could be related to: (1) CVE fix (2) upgrade of vulnerable dependency (3) fix to secret leak and others. Please consider to update the reference to the action.

Created at 1 month ago

Update release.yml

cache dependencies using setup-node@v2

fix: use checkout@v2

Closes #11

Merge pull request #12 from peerigon/leomelzer-patch-1

Created at 1 month ago
fix: update actions
  • Update to checkout@v2
  • Use caching mechanism from setup-node@v2
  • Use node v16 instead of v15
Created at 1 month ago
Created at 1 month ago
Allow concise early return

We should allow the following pattern:

function someFunction() {
    if (someCondition) return true;
}

It was originally disallowed because when a second statement is added, you might forget to add braces around it. However, with Prettier the risk is really low since Prettier will move the second statement on the lower indentation level.

Created at 1 month ago
Allow concise early return

This pattern is allowed now :)

Created at 1 month ago
Use flat config format

https://eslint.org/blog/2022/08/new-config-system-part-2/

Created at 1 month ago
pull request opened
feat: Refactor paginated endpoints

Methods that request paginated endpoints will now request every page automatically. As an example: after switching to v2, getCustomers() did not return all customers anymore. It only returned all customers from the first page. With this change, the following methods will automatically request all pages:

  • getCustomers()
  • getProjects()
  • getEntries()
  • getEntriesTexts()

In order to get each page indiviually, please use:

  • getCustomersPage()
  • getProjectsPage()
  • getEntriesPage()
  • getEntriesTextsPage()

BREAKING CHANGE: getCustomers(), getProjects(), getEntries(), getEntriesTexts() won't return a paging property anymore since pages are now requested automatically.

BREAKING CHANGE: We've also improved some typings for these endpoints which might break your TypeScript build.

Created at 2 months ago
create branch
jhnns create branch beta
Created at 2 months ago
fix: update actions

All good, the project is still used in our TypeScript workshop :) I'll merge it as soon as the last thing is resolved.

Created at 2 months ago
pull request reopened
fix: update actions
  • Update to checkout@v2
  • Use caching mechanism from setup-node@v2
  • Use node v16 instead of v15
Created at 2 months ago