Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@yworks/migrate-yfiles-app
Advanced tools
Readme
Migrate outdated yFiles for HTML code to yFiles for HTML 2.6.
The source of this tool is available at GitHub.
Install the migration tool globally:
npm install -g @yworks/migrate-yfiles-app
Migrate your project:
migrate-yfiles-app --src=./src --dest=./src-migrated --from=1.3
The output of the tool includes code locations in a simple format that will be recognized by most IDEs (e.g. VS Code, Webstorm), so you can click on output lines to migrate the corresponding code manually.
The tool offers an incremental mode where it will not actually transform your files, but will only output messages that describe what has to be changed at which location. This allows you to migrate your app iteratively, until no such messages are printed anymore. The messages usually take the following form:
The thing 'oldThing' has been changed to 'newThing' in version <versionNumber>. [additional information here.]
at <absolute path to file, including line and column numbers>
We recommend running the tool once in non-incremental mode to get the automatic code changes, and afterwards running it in incremental mode to migrate the things that could not be handled automatically.
Messages can also be suppressed by putting a comment with the content @migration-ignore
above the line where the message occurs.
This is useful if you are sure that the code is already correct.
-f | --from | The version of yFiles for HTML from which to migrate. Available options: 1.3, 1.4, 2.0, 2.1, 2.2, 2.3, 2.4 |
-s | --src | The input file/directory to be transformed. |
-d | --dest | The destination directory where all transformed files will be written to. This has to be empty unless the --incremental or --force options are specified. |
-i | --incremental | Run the migration tool in incremental mode. |
-e | --extensions | Which file extensions to transform. Default: .js and .ts |
--ignore-pattern | Ignore files that match the provided glob expression (default: **/node_modules/** ). | |
-l | --singleline | Write log messages in a single line instead of printing the source location to a second line. |
-v | --verbose | Log verbose jscodeshift messages |
--force | Overwrite files in the destination directory. | |
-nc | --nocolor | Don't colorize the log messages. |
--version | Show the version number. | |
--help | Show help. | |
-t | --transforms | Which transforms to apply. |
The migration tool uses the npm debug module to log debugging information in individual transforms. To enable all debug messages, set the DEBUG
environment variable to migrate-yfiles-app:*
. This will output all migration tool debug messages. To restrict the debug output to a specific
feature/transform, use the corresponding specifier, e.g. DEBUG=migrate-yfiles-app:toEs6Class
.
Navigating possible problems detected by the migration tool can be facilitated using a problem matcher in VS Code. The messages are summarized by file in the problems panel, and the corresponding sections are highlighted in the source code:
To enable problem matching in VS Code, add a task with the matcher definition to your .vscode/tasks.json
file:
{
"version": "2.0.0",
"tasks": [
{
"label": "Run yFiles migration tool",
"type": "shell",
"command": "migrate-yfiles-app",
"args": [
"--src=app-src",
"--dest=dest/",
"--from=1.3",
"--force",
"--singleline"
],
"problemMatcher": {
"fileLocation": ["absolute"],
"pattern": {
"regexp": "^(.*?):(\\d+):(\\d+)\\s-\\s(.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
},
"presentation": {
"clear": true,
"showReuseMessage": false
}
}
]
}
FAQs
Semi-automatically migrate yFiles for HTML code to the latest version
The npm package @yworks/migrate-yfiles-app receives a total of 3 weekly downloads. As such, @yworks/migrate-yfiles-app popularity was classified as not popular.
We found that @yworks/migrate-yfiles-app demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.