Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update management permission regex #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Toumash
Copy link

@Toumash Toumash commented Dec 2, 2021

Issue with details can be found here: #22

New regex for checking if code is using the management module

There is something more missing, because adding this code to examples\background\dist\background.js

chrome.management.getSelf(() => {
// my code
})

and running the build

yarn; yarn build;
cd examples/background
yarn;yarn build;

still adds management into examples\background\dist\manifest.json

I'm still unsure how exactly code in file src\manifest-input\manifest-parser\permissions.ts is being used

@Toumash Toumash force-pushed the bugfix/management-api-exclude-from-needing-permissions branch from ffad6c8 to 8022a05 Compare December 2, 2021 20:46
@Toumash
Copy link
Author

Toumash commented Dec 2, 2021

Writing the test in the src\manifest-input\__tests__\manifest__hook--generateBundle.test.ts should be easier that this testing, but i cannot get it to run

yarn test
yarn run v1.22.17
$ cross-env TS_NODE_COMPILER_OPTIONS={\"module\":\"commonjs\"} mocha --file tests/unit/setup.ts --require ts-node/register --require tsconfig-paths/register

TSError:  Unable to compile TypeScript:
src/utils/helpers.ts:84:25 - error TS2571: Object is of type 'unknown'.

84             handleError(error.message);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant