FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.63k stars 861 forks source link

Use dirent.parentPath instead of deprecated .path #6172

Closed absidue closed 4 days ago

absidue commented 6 days ago

Use dirent.parentPath instead of deprecated .path

Pull Request Type

Description

Dirent.path was removed in this Node.js commit https://github.com/nodejs/node/commit/d9540b51ebc1a97bbb109fff0825c2f0090aefa2 it hasn't been released yet but when it does it will break this script, so I'm updating the script now already so we don't have to wonder later why the production (nightly, release etc) builds are failing.

Testing

  1. yarn run pack (don't leave out the run part, otherwise you'll just get a tar.gz npm bundle)
  2. npx prettier@2.8.8 --write --no-config dist/main.js, prettier is more forceful than other formatters which is why I used it to make the mimified file readable (prettier 3 silently fails on the command line, which is why I explicitly specified the last version of v2)
  3. Search for /static/ in dist/main.js
  4. Check that the injected paths look okay.

Desktop