@barefootjs/mojolicious 0.9.6 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/mojolicious",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Mojolicious EP template adapter for BarefootJS - generates .html.ep files from IR",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"directory": "packages/adapter-mojolicious"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@barefootjs/shared": "0.
|
|
55
|
+
"@barefootjs/shared": "0.10.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@barefootjs/jsx": ">=0.2.0",
|
|
@@ -60,6 +60,6 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@barefootjs/adapter-tests": "0.1.0",
|
|
63
|
-
"@barefootjs/jsx": "0.
|
|
63
|
+
"@barefootjs/jsx": "0.10.1"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// (Mojolicious's built-in dispatcher does not honour URL prefixes,
|
|
11
11
|
// so the explicit routes are load-bearing — without them every
|
|
12
12
|
// stylesheet and client bundle 404s in the browser).
|
|
13
|
-
// - `
|
|
14
|
-
//
|
|
13
|
+
// - the `cpanfile` declares the BarefootJS Perl deps + Mojolicious
|
|
14
|
+
// (installed from CPAN, not vendored under `lib/`), and the plugin's
|
|
15
15
|
// manifest-driven child rendering works without per-component wire-up.
|
|
16
16
|
//
|
|
17
17
|
// BAREFOOT_CREATE_INTEGRATION=1 bun test src/__tests__/scaffold.test.ts
|
|
@@ -143,24 +143,24 @@ describe.skipIf(!INTEGRATION)(
|
|
|
143
143
|
// -------------------------------------------------------------------------
|
|
144
144
|
|
|
145
145
|
describe('mojo wiring', () => {
|
|
146
|
-
test('
|
|
147
|
-
|
|
146
|
+
test('does not vendor BarefootJS .pm copies under lib/', () => {
|
|
147
|
+
// The Perl modules ship on CPAN now, so the scaffold pulls them
|
|
148
|
+
// via `cpanm --installdeps .` instead of vendoring copies. A
|
|
149
|
+
// stray lib/ would shadow the installed dist (app.pl no longer
|
|
150
|
+
// adds it to @INC anyway).
|
|
151
|
+
expect(existsSync(path.join(projectDir, 'lib', 'BarefootJS.pm'))).toBe(false)
|
|
148
152
|
})
|
|
149
153
|
|
|
150
|
-
test('
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
//
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
path.join(projectDir, 'lib', 'Mojolicious', 'Plugin', 'BarefootJS', 'DevReload.pm'),
|
|
157
|
-
),
|
|
158
|
-
).toBe(true)
|
|
159
|
-
})
|
|
160
|
-
|
|
161
|
-
test('cpanfile lists Mojolicious', () => {
|
|
154
|
+
test('cpanfile declares the BarefootJS Perl deps + Mojolicious', () => {
|
|
155
|
+
// `Mojolicious::Plugin::BarefootJS` (the plugin + dev-reload
|
|
156
|
+
// plugin + BarefootJS::Backend::Mojo) and `BarefootJS` (core)
|
|
157
|
+
// are declared so `cpanm --installdeps .` installs everything
|
|
158
|
+
// `plugin 'BarefootJS'` / `plugin 'BarefootJS::DevReload'` need
|
|
159
|
+
// at boot.
|
|
162
160
|
const cp = readFileSync(path.join(projectDir, 'cpanfile'), 'utf-8')
|
|
163
|
-
expect(cp).toMatch(/
|
|
161
|
+
expect(cp).toMatch(/^requires 'BarefootJS'/m)
|
|
162
|
+
expect(cp).toMatch(/^requires 'Mojolicious::Plugin::BarefootJS'/m)
|
|
163
|
+
expect(cp).toMatch(/^requires 'Mojolicious'/m)
|
|
164
164
|
})
|
|
165
165
|
|
|
166
166
|
test('plugin auto-loads manifest — no per-route register_components_from_manifest call', () => {
|