=======
Allow to package a plug-in.
License: Eclipse Public License 2.0
=======
Allow to package a plug-in.
If we try to package plugin in yarn workspace we will have error:
irst-plugin: => ๐ The dependency /Users/yevhen/work/test/test-plugin-packager/plugins/first-plugin/node_modules/aproba is referenced but is not available on the filesystem
first-plugin: error Command failed with exit code 1.
first-plugin: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
first-plugin: error Command failed with exit code 1.
first-plugin: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run prepare exited 1 in 'first-plugin'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
To reproduce the problem clone and build: https://github.com/evidolob/test-plugin-packager
Currently, this tool isn't able to pack a plugin which is a part of a monorepository.
I see here two problems at least:
yarn list
returns dependencies for all packages including packages (plugins) itself;I believe, the first problem could be solved by filtering all the dependencies by a package (plugin) name which gives us only dependencies of a plugin.
For the second problem, we need to keep in mind that dependency could be resolved on the filesystem to /node_modules
in the root of workpace or some /plugins/plugin-name/node_modules
as well.
Is this project abandoned? The last commit was several years ago and there are a number of security vulnerabilities due to outdated dependencies. Is there an alternative way to package plugins?
There is a problem between build theia-plugin-packager on version 1.21.0 and 1.21.1:
Logs from using yarn 1.21.0
vlad@MacBook-Pro-15-Vlad theia-plugin-packager % yarn
yarn install v1.21.0
[1/4] ๐ Resolving packages...
success Already up-to-date.
$ yarn run clean && yarn run build
yarn run v1.21.0
$ rimraf dist
โจ Done in 0.36s.
yarn run v1.21.0
$ yarn run compile && yarn run format-code && yarn run tslint-fix && yarn run test
$ tsc && chmod +x dist/index.js
$ tsfmt -r
$ tslint --fix --project .
$ jest
PASS tests/assembly/assembly.spec.ts
(node:76677) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
PASS tests/zip/zip.spec.ts
PASS tests/exec.spec.ts
PASS tests/yarn/yarn.spec.ts
PASS tests/validate/validate.spec.ts
PASS tests/step/step.spec.ts
PASS tests/zip/zip-mock.spec.ts
PASS tests/logger.spec.ts
PASS tests/step/steps-flow.spec.ts
PASS tests/cli-error.spec.ts
---------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
---------------|----------|----------|----------|----------|-------------------|
All files | 100 | 98.67 | 100 | 100 | |
assembly.ts | 100 | 100 | 100 | 100 | |
cli-error.ts | 100 | 100 | 100 | 100 | |
command.ts | 100 | 100 | 100 | 100 | |
logger.ts | 100 | 100 | 100 | 100 | |
step.ts | 100 | 100 | 100 | 100 | |
steps-flow.ts | 100 | 100 | 100 | 100 | |
validate.ts | 100 | 100 | 100 | 100 | |
yarn.ts | 100 | 97.62 | 100 | 100 | 154 |
zip.ts | 100 | 100 | 100 | 100 | |
---------------|----------|----------|----------|----------|-------------------|
Test Suites: 10 passed, 10 total
Tests: 40 passed, 40 total
Snapshots: 0 total
Time: 3.279s
Ran all test suites.
โจ Done in 10.69s.
โจ Done in 12.15s.
Logs from using yarn 1.21.1
vlad@MacBook-Pro-15-Vlad theia-plugin-packager % yarn
yarn install v1.21.1
warning package.json: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
[1/4] ๐ Resolving packages...
success Already up-to-date.
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
$ yarn run clean && yarn run build
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
yarn run v1.21.1
warning package.json: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
$ rimraf dist
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
โจ Done in 0.36s.
yarn run v1.21.1
warning package.json: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
$ yarn run compile && yarn run format-code && yarn run tslint-fix && yarn run test
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning package.json: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
$ tsc && chmod +x dist/index.js
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning package.json: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
$ tsfmt -r
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning package.json: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
$ tslint --fix --project .
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning package.json: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
$ jest
warning @theia/[email protected]: Invalid bin entry for "theia:plugin" (in "@theia/plugin-packager").
PASS tests/assembly/assembly.spec.ts
(node:76092) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
PASS tests/zip/zip.spec.ts
PASS tests/yarn/yarn.spec.ts
PASS tests/exec.spec.ts
PASS tests/validate/validate.spec.ts
PASS tests/zip/zip-mock.spec.ts
PASS tests/step/steps-flow.spec.ts
PASS tests/step/step.spec.ts
PASS tests/logger.spec.ts
PASS tests/cli-error.spec.ts
---------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
---------------|----------|----------|----------|----------|-------------------|
All files | 100 | 98.67 | 100 | 100 | |
assembly.ts | 100 | 100 | 100 | 100 | |
cli-error.ts | 100 | 100 | 100 | 100 | |
command.ts | 100 | 100 | 100 | 100 | |
logger.ts | 100 | 100 | 100 | 100 | |
step.ts | 100 | 100 | 100 | 100 | |
steps-flow.ts | 100 | 100 | 100 | 100 | |
validate.ts | 100 | 100 | 100 | 100 | |
yarn.ts | 100 | 97.62 | 100 | 100 | 154 |
zip.ts | 100 | 100 | 100 | 100 | |
---------------|----------|----------|----------|----------|-------------------|
Test Suites: 10 passed, 10 total
Tests: 40 passed, 40 total
Snapshots: 0 total
Time: 3.121s
Ran all test suites.
โจ Done in 10.41s.
โจ Done in 11.86s.
If line package.json#L8 is removed, then build will be successful without any warnings, but there will be only one binary from two desirable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.