aurelia / pal-nodejs Goto Github PK
View Code? Open in Web Editor NEWThe NodeJS-based implementation of Aurelia's platform abstraction layer.
License: MIT License
The NodeJS-based implementation of Aurelia's platform abstraction layer.
License: MIT License
I'm submitting a bug report
Please tell us about your environment:
Operating System:
Linux (Ubuntu 23.04)
Node Version:
18.16.1
Current behavior:
After upgrading aurelia-pal-nodejs from 2.0.0 (with jsdom 15) to 3.0.0-rc.1 (with jsdom 19), my components tests using aurelia-testing
stopped to work because the initialization of ComponentTester
(its create
method) fails with: TypeError: Cannot assign to read only property 'undefined' of object '#<Object>'
at this line.
This happens because of upgraded jsdom package whose version 16 adds not writable undefined
property to its window.
Is this supposed to work? Or is there maybe anything wrong in my setup?
I'm submitting a bug report
Please tell us about your environment:
Operating System:
Linux Ubuntu
Node Version:
10.16.0
NPM Version:
6.9.0
JSPM OR Webpack AND Version
npm - using this on the server
Browser:
N/A
Language:
Typescript
4.1.5
Current behavior:
Security issue reported by snyk:
Run 'snyk test' and you get
โ Prototype Pollution [High Severity][https://snyk.io/vuln/SNYK-JS-AJV-584908] in [email protected]
introduced by [email protected] > [email protected] > [email protected] > [email protected] > [email protected] and 1 other path(s)
This issue was fixed in versions: 6.12.3
Expected/desired behavior:
No security issues
What is the expected behavior?
No security issues
What is the motivation / use case for changing the behavior?
Security
I think it may be a case of rebuilding the package and re-publishing but not 100%.
Version: 1.0.0-alpha.2
integrating aurelia with latest version leads to a lock up of of the nodejs process. Mostly likely due to the timers used by the mutation observer.
Need an option to disable/tear-down the mutation-observer's dirty checking to allow the node process to terminate.
@EisenbergEffect any chance this repo could be added to the circle-ci runner? I think there is a yml config already setup in the repo for it.
I'm submitting a bug report
Please tell us about your environment:
Operating System:
Windows 10
Node Version:
8.5.0
NPM Version:
yarn 1.3.2
Language:
TypeScript 2.7.1
Current behavior:
https://github.com/aurelia/testing/blob/b0fb939fa40f1067ac72d84c7775088f8b8068a6/src/wait.ts#L27
When tests are run with jest there is no instanceof NodeList.
It is though under global.window, not under global though.
So even though the element is successfully found by waitForElement - it is not returned.
What is the expected behavior?
waitForElement returns an element when using Jest to run tests.
What is the motivation / use case for changing the behavior?
being able to waitForElement in tests
can be closed with #28
same issue in testing repo aurelia/testing#83
Currently the mutation searcher operates via a timer. With many observers this is likely to be a performance drain. Most importantly, using repeating timers locks the process open and requires explicit clean up (See #12).
notifychanged(node:Node)
emits "changed" (node:Node)MutationObserver
subscribe to MutationNotifier
setTimeout
, if nullMutationNotifier.instance().notifychanged(this)
It should be possible to integrate the Shadow DOM polyfill into this repository and clean up any hacks (i.e. we can create as many document roots as needed with jsdom)
Not currently a priority.
I'm submitting a bug report
Please tell us about your environment:
Operating System:
Windows 10
Node Version:
8.12.0
Current behavior:
Building an SSR-enabled site with aurelia, and after I've updated the aurelia-cli
to version 1.0.0-beta.12
(both globally and with --save-dev
I've started getting exceptions upon refreshing the page.
The first run of the site after npm run server
works fine, hoewever, as soon as you press F5 to refresh whichever page you're on, the page only displays Internal server error
, and I get one of two exceptions.
First I aways get this aurelia-pal-nodejs exception:
TypeError: Cannot set property XMLHttpRequest of #<NodeJsPlatform> which has only a getter
at Function.assign (<anonymous>)
at aurelia_pal_1.initializePAL (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\aurelia-pal-nodejs\dist\index.js:18:16)
at Object.initializePAL (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\aurelia-pal\dist\commonjs\aurelia-pal.js:96:3)
at Object.initialize (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\aurelia-pal-nodejs\dist\index.js:17:19)
at Object.151 (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\dist\server.bundle.js:1:136916)
at r (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\dist\server.bundle.js:1:194)
at Object.62 (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\dist\server.bundle.js:1:409630)
at r (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\dist\server.bundle.js:1:194)
at module.exports.0.t.__esModule (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\dist\server.bundle.js:1:1219)
at Object.<anonymous> (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\dist\server.bundle.js:1:1229)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
And if I press F5 again on the page, the aurelia-ssr-engine exception comes up (I've made and issue on that repo as well):
TypeError: Cannot read property 'reconfigure' of undefined
at start (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\aurelia-ssr-engine\dist\commonjs\aurelia-ssr-engine.js:53:20)
at render (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\aurelia-ssr-engine\dist\commonjs\aurelia-ssr-engine.js:25:12)
at C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\custom-middleware-koa.js:14:12
at app.use (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\server.js:85:9)
at dispatch (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\koa-compose\index.js:42:32)
at app.use (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\server.js:57:16)
at dispatch (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\koa-compose\index.js:42:32)
at app.use (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\server.js:38:18)
at dispatch (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\koa-compose\index.js:42:32)
at C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\koa-http-request\index.js:14:11
at dispatch (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\koa-compose\index.js:42:32)
at serve (C:\Software Development\Projects\Gigantisch\TrappenGigant\TrappenGigant\node_modules\koa-static\index.js:53:15)
at <anonymous>`
Note that I'm using two forks by @JeroenVinke (sorry for the tag, dude) of the aurelia-ssr-engine
and aurelia-ssr-bootstrapper-webpack
:
"aurelia-ssr-bootstrapper-webpack": "github:JeroenVinke/ssr-bootstrapper-webpack-1#error-handling-build",
"aurelia-ssr-engine": "github:JeroenVinke/ssr-engine#meta-tags-build",
Also relevant might be the custom middleware for Koa that we use, which has been in place for months and has worked perfectly until this update of the cli:
const {render} = require("aurelia-ssr-engine");
function aureliaKoaMiddleware (renderOptions, initializationOptions) {
return function (ctx, next) {
const url = ctx.request.URL;
const pathname = url.pathname;
// skip requests where urls have an extension
const extensionMatcher = /^.*\.[^\\]+$/;
if (pathname.match(extensionMatcher)) {
return next();
}
return render(Object.assign({ url }, renderOptions), initializationOptions)
.then((html) => {
ctx.body = html;
})
.catch((e) => {
// if there is an error, call next middleware (which serve the default html template without SSR)
console.log(e);
return next();
});
};
};
module.exports = {
aureliaKoaMiddleware
};
Expected/desired behavior:
Hi,
Is the library usable for basic markup ? Can you provide some documentation on how use this ?
It's not implemented in JSDOM :(
We should at least make it an fallback to an empty class for now, cause I'm getting unhandled rejections now from aurelia-binding that does instanceof SVGElement
checks:
<rejected> TypeError: Right-hand side of 'instanceof' is not an object
at ObserverLocator.getAccessor (./node_modules/aurelia-binding/dist/commonjs/aurelia-binding.js:4612:59)
Dear @bigopon , we, users of Aurelia 1, would be very grateful, if you could release the final version of the package. BTW, it would be great to update all dependencies to the latest versions.
Thank you in advance,
๐
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.