fluid-dev / hexo-theme-fluid

:ocean: 一款 Material Design 风格的 Hexo 主题 / An elegant Material-Design theme for Hexo
https://hexo.fluid-dev.com/
GNU General Public License v3.0
7.39k stars 1.13k forks source link

npm warn deprecated(npm弃用警告)- inflight@1.0.6、glob@7.2.3、cuid@2.1.8 #1121

Closed Martinxux closed 3 months ago

Martinxux commented 3 months ago

请确认

问题描述

在使用action进行部署的时候,发现log中间有这样的报错,不在支持某些包,并且inflight@1.0.6会有内存泄漏的问题。 (When using actions for deployment, I found that there is such an error in the middle of the log, some packages are not supported, and there is a memory leak problem in inflight@1.0.6.)

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.

image

我尝试手动安装更高版本的glob@11.0.0和最新版的stylus(如版本信息所示),但是并没有起作用,找到了stylus#2883的一个issue,看起来是有相同的问题,想问下这个stylus有替代吗? 虽然看起来好像没有出现什么问题,不影响Blog的显示等但是强迫症看起来很不舒服,而且出问题看起来应该是时间问题吧。 (I tried manually installing a later version of glob@11.0.0 and the latest version of stylus (as shown in the version info) but it didn't work, found an issue in stylus#2883, it looks like there is the same problem, would like to ask if there is an alternative to this stylus? Although it seems that there is no problem, it does not affect the display of the blog, etc. OCD looks uncomfortable, and it seems that it should be a matter of time before something goes wrong)

action文件信息

name: GitHub Pages

# 触发器、分支
on:
  push:
    branches:
      - main  # default branch
jobs:
  # 子任务
  pages:
    runs-on: ubuntu-latest # 定运行所需要的虚拟机环境
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
          fetch-depth: 0
      # 每个name表示一个步骤:step
      - name: Use Node.js 20.x
        uses: actions/setup-node@v4
        with:
          node-version: '20.16.0' # 自己正在使用的node版本即可
      - name: Global Config
        env:
          ACTIONS_DEPLOY_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
        run: |
          sudo timedatectl set-timezone "Asia/Shanghai"
          mkdir -p ~/.ssh/
          echo "$ACTIONS_DEPLOY_KEY" > ~/.ssh/id_rsa
          chmod 600 ~/.ssh/id_rsa
          git config --global user.email "128@aa.mail"
          git config --global user.name "Martinxu"
          git ls-files -z | while read -d '' path; do touch -d $(git log -1 --format="@%ct" "$path") "$path"; done
      # - run: node -v # 查看node版本号
      # 缓存依赖项: https://docs.github.com/cn/actions/using-workflows/caching-dependencies-to-speed-up-workflows
      - name: Cache NPM dependencies
        uses: actions/cache@v3
        with:
          # npm cache files are stored in `~/.npm` on Linux/macOS
          path: ~/.npm
          # path: node_modules
          key: ${{ runner.OS }}-npm-cache
          restore-keys: |
            ${{ runner.OS }}-npm-cache
      # 查看路径 : /home/runner/work/blog/blog
      # - name: Look Path
      #   run: pwd
      # 查看文件
      - name: Look Dir List
        run: tree -L 3 -a
      # 第一次或者依赖发生变化的时候执行 Install Dependencies,其它构建的时候不需要这一步
      - name: Install Dependencies
        run: npm install
      - name: Look Dir List
        run: tree -L 3 -a
      - name: Clean
        run: npm run clean
      - name: Build
        run: npm run build
      - name: Deploy
        run: npm run deploy
      - name: Get the output
        run: |
          echo "${{ steps.deploy.outputs.notify }}"

版本信息

node version : v20.16.0 npm version : 10.8.2

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "7.3.0"
  },
  "dependencies": {
    "glob": "^11.0.0",
    "hexo": "^7.0.0",
    "hexo-asset-image": "github:CodeFalling/hexo-asset-image",
    "hexo-cli": "^4.3.2",
    "hexo-deployer-git": "^4.0.0",
    "hexo-generator-archive": "^2.0.0",
    "hexo-generator-category": "^2.0.0",
    "hexo-generator-feed": "^3.0.0",
    "hexo-generator-index": "^3.0.0",
    "hexo-generator-sitemap": "^3.0.1",
    "hexo-generator-tag": "^2.0.0",
    "hexo-neat": "^1.0.9",
    "hexo-renderer-ejs": "^2.0.0",
    "hexo-renderer-markdown-it": "^7.1.1",
    "hexo-renderer-stylus": "^3.0.0",
    "hexo-server": "^3.0.0",
    "hexo-theme-landscape": "^1.0.0",
    "markdown-it-emoji": "^3.0.0",
    "stylus": "^0.63.0"
  }
}

预期

无相应的警告 (There are no corresponding warnings)

zkqiang commented 3 months ago

Fluid CSS 是基于 stylus 写的,这个替代不了。

实际不会有什么影响,如果要消除只能等待 stylushexo-renderer-stylus 升级