
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
主要是把基于requirejs baseUrl的路径转成相对路径,如下目录结构
relativify [目录] [选项]
选项:
-dir 选定目录下的文件夹
-file 选择目录下的文件
-ext 选定待转换的文件扩展名,如:'-ext js,jsx,es6';默认为js,jsx
--todo
+--views
+--view.js
+--models
+--model.js
+--app.js
require配置的baseUrl为todo
//app.js
define(function(require) {
var view = require('views/view');
var model = require('models/model');
})
运行relativify之后,将转为:
define(function(require) {
var view = require('./views/view');
var model = require('./models/model');
})
FAQs
把require基基于baseUrl的写法转成相对路径
The npm package relativify receives a total of 14 weekly downloads. As such, relativify popularity was classified as not popular.
We found that relativify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.