![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
connect-dojo
Advanced tools
This Connect middleware transparently download and display Dojo files.
In its simplest form, it takes no argument and the latest stable release is used. Here is a quick example:
var express = require('express');
var serve_static = require('serve-static');
var dojo = require('connect-dojo');
var app = express.createServer();
app.configure(
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser());
app.use(app.router);
app.use(dojo());
app.use(serve_static(__dirname + '/public'));
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
);
app.listen(3000);
'1.7.1'
, apply only to the 'download' methodSource code is downloaded from the official Dojo website and all the versions present on the website are available. For example to download the version '1.5.0', setup the middleware as:
dojo({ version: '1.7.1' })
If the option 'method' is set to 'git' and the revision option of a dojo project is not defined, the middleware will checkout the HEAD revision. Each Dojo project will be store inside a directory defined by the option 'repository' and named as"git-#{project}-HEAD". Here's how to download the latest from GitHub while preserving working tests:
dojo({
method: 'git',
repository: __dirname+"../public/dojo",
mapping:
dojo: './dojo'
dijit: './dijit'
dojox: './dojox'
util: './util'
});
If the option 'method' is set to 'git' and one of 'dojo_revision', 'dijit_revision', 'dojox_revision' or 'util_revision' is defined, then the middleware to checkout the revision in a specific directory inside the one defined by the option 'repository' and named as "git-${project}-#{revision}".
To prevent multiple application from conflicting, a new directory is created for each released version and git revision. This can lead to a large number of directories as new revisions are setup over time. By default, source code is stored inside the connect-dojo module and it is recommended to define your own directory through the 'repository' option.
Running the tests can take a long time because of the size of dojo. Using expresso, run the following command by adjusting the '-t' (timeout) argument:
expresso -s -t 10000 test
FAQs
Connect middleware exposing the Dojo Toolkit
The npm package connect-dojo receives a total of 3 weekly downloads. As such, connect-dojo popularity was classified as not popular.
We found that connect-dojo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.