-
Notifications
You must be signed in to change notification settings - Fork 53
update dependencies #268
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 dependencies #268
Conversation
romainmenke
commented
Nov 19, 2022
- update all dependencies
- migrate travis CI to github actions
- migrate test files so that these work with the updated dependencies and in modern node versions
| // DeprecationWarnings are throw higher in the stack since Node 16. | ||
| // These can no longer be caught. | ||
| test.skip('deprecated constructor', '', (t) => { | ||
| t.throws( | ||
| () => { | ||
| return new Attribute({value: '"foo"', attribute: "data-bar"}); | ||
| }, | ||
| {message: "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."} | ||
| ); | ||
| }); | ||
|
|
||
| test.skip('deprecated get of raws.unquoted ', '', (t) => { | ||
| t.throws( | ||
| () => { | ||
| let attr = new Attribute({value: 'foo', quoteMark: '"', attribute: "data-bar"}); | ||
| return attr.raws.unquoted; | ||
| }, | ||
| {message: "attr.raws.unquoted is deprecated. Call attr.value instead."} | ||
| ); | ||
| }); | ||
|
|
||
| test.skip('deprecated set of raws.unquoted ', '', (t) => { | ||
| t.throws( | ||
| () => { | ||
| let attr = new Attribute({value: 'foo', quoteMark: '"', attribute: "data-bar"}); | ||
| attr.raws.unquoted = 'fooooo'; | ||
| }, | ||
| {message: "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now."} | ||
| ); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These always fail in node 16+
The failures are unrelated to updating dependencies.
It seems that the error used to be thrown at the call site but now is throw higher up the stack.
This seems to be related to support for worker threads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with it curretly (to avoid blocking new release), but I think we should investigate why it happens and how to fix it, because we can't test our deprecated message and it can be a problem...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to look into this further.
This should not be blocking for releases, so maybe best to keep it open until we know more.
|
Also I think we can avoid using |
…es--resourceful-ferret-a96d437389
|
I was able to create a minimal repro of what was changed in nodejs for import util from 'util';
process.throwDeprecation = true;
const obsoleteFunction = util.deprecate(() => {
// Do something here.
}, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.');
try {
obsoleteFunction();
} catch (err) {
// node12
console.log('caught');
}In node12 the I was able to work around this by not throwing on deprecations and listening via another method : function waitForWarning() {
return new Promise((resolve) => {
process.once('warning', (err) => {
resolve(err);
});
});
} |
Is it possible this was added for when the package is used in browsers? |
I mean we can copy/paste this code, because it is very simple package |
Maybe best to do this in a follow up PR? |
👍 |
|
Thank you |