@hasna/paths

中文文档
0.2.3发布于 2026/09/04Apache-2.0零依赖近 30 天下载 7.6万

DELETED — see README

此软件包已被标记为弃用

DELETED 2026-09-03 — @hasna/paths removed entirely (hasna/apps#1535); consumers migrated to in-package resolvers. Uninstall; see README for delete steps.

原始使用文档
文档目录3 节
  1. What happened
  2. Replacement
  3. Delete steps for the owner (hasna)

@hasna/paths — DELETED

This package is deleted (2026-09-03). Do not install it, and remove it from any package.json that still lists it.

What happened

The @hasna/paths package (the package-owned XDG/macOS path resolver for Hasna apps) was removed entirely from the public tree per the owner directive (hasna/apps#1535). The hasna/apps monorepo no longer contains apps/paths, and every in-repo consumer was migrated to an in-package local implementation of the resolver contract (dataDir / stateDir / configDir / cacheDir; XDG + macOS home layout honoring HASNA_CONFIG_HOME / HASNA_DATA_HOME / HASNA_STATE_HOME / HASNA_CACHE_HOME overrides) — resolution semantics are unchanged.

Replacement

There is no replacement package. Consumers must implement the handful of home-directory resolution helpers locally (or import them from whichever Hasna app they integrate with). The former behavior:

  • dataDir({ app }) → ~/.local/share/hasna/<app> (macOS: ~/Library/Application Support/Hasna/<app>), override HASNA_DATA_HOME
  • stateDir({ app }) → ~/.local/state/hasna/<app> (macOS: ~/Library/Logs/Hasna/<app>), override HASNA_STATE_HOME
  • configDir({ app }) → ~/.config/hasna/<app> (macOS: ~/Library/Application Support/Hasna/<app>), override HASNA_CONFIG_HOME
  • cacheDir({ app }) → ~/.cache/hasna/<app> (macOS: ~/Library/Caches/Hasna/<app>), override HASNA_CACHE_HOME

An empty env override is treated as unset; an app slug must be lowercase kebab-case.

Delete steps for the owner (hasna)

This placeholder version exists so the npm page documents the deletion. To fully remove the package from the registry:

  1. npm unpublish @hasna/paths --force (self-service) — only possible while the package meets npm's unpublish policy (zero public dependents, <300 downloads/week, single owner). The current NPM_HASNA_PROD granular token cannot perform DELETE (E403 — Granular access tokens that bypass two-factor authentication may not perform this action); a 2FA-compliant token is required.
  2. Otherwise file a request at https://support.npmjs.com (category Unpublish request) for @hasna/paths:
    • owner: andreihasna2
    • versions: all (0.1.0, 0.2.0, 0.2.1, 0.2.2, 0.2.3 placeholder)
    • reason: package deleted from source; all consumers migrated; placeholder published 2026-09-03 to document the deletion.

版本与发布记录

@hasna/paths 共发布 5 个版本,首次发布于 2026/08/26;过去 12 个月发布了 5 个版本。

版本发布日期距今
0.2.3latest2026/09/042 个月前
0.2.22026/08/272 个月前
0.2.12026/08/272 个月前
0.2.02026/08/262 个月前
0.1.02026/08/262 个月前

关于 @hasna/paths 的常见问题

@hasna/paths 是什么?

DELETED — see README注意:该包已被作者标记为弃用——DELETED 2026-09-03 — @hasna/paths removed entirely (hasna/apps#1535); consumers migrated to in-package resolvers. Uninstall; see README for delete steps.

如何安装 @hasna/paths?

在项目目录运行 npm install @hasna/paths,或使用 pnpm add / yarn add / bun add。

@hasna/paths 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/hasna__paths 是否存在。

@hasna/paths 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@hasna/paths 可以商用吗?

@hasna/paths 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@hasna/paths 的下载量有多少?

根据 npm 官方下载统计,@hasna/paths 在 2026/10/18 – 2026/11/16 这 30 天内被下载 75,774 次,日均约 2,526 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@hasna/paths 还在维护吗?

最新版本 0.2.3 发布于 2026/09/04(2 个月前);至今共发布 5 个版本,其中过去 12 个月发布了 5 个;首次发布于 2026/08/26。作者已将其标记为弃用,新项目建议寻找替代方案。