Skip to content

Commit 9f604e7

Browse files
committed
Allowing @hotwired/stimulus, allowing @symfony/stimulus-bridge 3, dropping v1
1 parent 1449ee5 commit 9f604e7

File tree

10 files changed

+1830
-2129
lines changed

10 files changed

+1830
-2129
lines changed

fixtures/stimulus/assets/controllers/hello_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Controller } from 'stimulus';
1+
import { Controller } from '@hotwired/stimulus';
22

33
export default class extends Controller {
44
connect() {

fixtures/stimulus/mock-module/dist/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Controller } from 'stimulus';
1+
import { Controller } from '@hotwired/stimulus';
22

33
export default class extends Controller {
44
connect() {

fixtures/vuejs3-typescript/App.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<template>
22
<div id="app">
3-
<img src="./assets/logo.png">
3+
<img :src="logoPath">
44
<hello></hello>
55
</div>
66
</template>
77

88
<script lang="ts">
99
import Hello from './components/Hello.vue'
10+
import logoPath from './assets/logo.png';
1011
1112
class TestClassSyntax {
1213
@@ -16,6 +17,9 @@ export default {
1617
name: 'app',
1718
components: {
1819
Hello
20+
},
21+
computed: {
22+
logoPath: () => logoPath
1923
}
2024
}
2125
</script>

lib/config-generator.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ const friendlyErrorPluginUtil = require('./plugins/friendly-errors');
3838
const assetOutputDisplay = require('./plugins/asset-output-display');
3939
const notifierPluginUtil = require('./plugins/notifier');
4040
const PluginPriorities = require('./plugins/plugin-priorities');
41-
const stimulusBridge = require('./plugins/stimulus-bridge');
4241
const applyOptionsCallback = require('./utils/apply-options-callback');
4342
const copyEntryTmpName = require('./utils/copyEntryTmpName');
4443
const getVueVersion = require('./utils/get-vue-version');
@@ -447,8 +446,6 @@ class ConfigGenerator {
447446

448447
variableProviderPluginUtil(plugins, this.webpackConfig);
449448

450-
stimulusBridge(plugins, this.webpackConfig);
451-
452449
cleanPluginUtil(plugins, this.webpackConfig);
453450

454451
definePluginUtil(plugins, this.webpackConfig);

lib/features.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ const features = {
151151
stimulus: {
152152
method: 'enableStimulusBridge()',
153153
packages: [
154-
{ name: '@symfony/stimulus-bridge', enforce_version: true },
155-
{ name: 'stimulus' }
154+
{ name: '@symfony/stimulus-bridge', enforce_version: true }
156155
],
157156
description: 'enable Stimulus bridge'
158157
}

lib/plugins/stimulus-bridge.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757
"@babel/plugin-transform-react-jsx": "^7.0.0",
5858
"@babel/preset-react": "^7.0.0",
5959
"@babel/preset-typescript": "^7.0.0",
60+
"@hotwired/stimulus": "^3.0.0",
6061
"@symfony/mock-module": "file:fixtures/stimulus/mock-module",
61-
"@symfony/stimulus-bridge": "^1.1.0 || ^2.0.0",
62+
"@symfony/stimulus-bridge": "^2.0.0 || ^3.0.0",
6263
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
6364
"@vue/babel-preset-jsx": "^1.0.0",
6465
"@vue/compiler-sfc": "^3.0.2",
@@ -89,14 +90,13 @@
8990
"sass": "^1.17.0",
9091
"sass-loader": "^9.0.1 || ^10.0.0 || ^11.0.0 || ^12.0.0",
9192
"sinon": "^9.0.2",
92-
"stimulus": "^2.0.0",
9393
"strip-ansi": "^6.0.0",
9494
"stylus": "^0.54.5",
9595
"stylus-loader": "^3.0.2 || ^4.0.0 || ^5.0.0",
96-
"ts-loader": "^8.0.1 || ^9.0.0",
97-
"typescript": ">=3.7.2",
98-
"vue": "^3.0.2",
99-
"vue-loader": "^16.1.0",
96+
"ts-loader": "^9.0.0",
97+
"typescript": "^4.2.2",
98+
"vue": "^3.2.14",
99+
"vue-loader": "^16.7.0",
100100
"vue-template-compiler": "^2.5",
101101
"webpack-notifier": "^1.6.0",
102102
"zombie": "^6.1.4"

test/functional.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,7 @@ module.exports = {
19221922
const appDir = testSetup.createTestAppDir();
19231923

19241924
const version = packageHelper.getPackageVersion('@symfony/stimulus-bridge');
1925-
if (!semver.satisfies(version, '^2.0.0')) {
1925+
if (!semver.satisfies(version, '^3.0.0')) {
19261926
// we support the old version, but it's not tested
19271927
this.skip();
19281928

test/package-helper.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ describe('package-helper', () => {
123123
describe('The getInvalidPackageVersionRecommendations correctly checks installed versions', () => {
124124
it('Check package that *is* the correct version', () => {
125125
const versionProblems = packageHelper.getInvalidPackageVersionRecommendations([
126-
{ name: 'stimulus', version: '^2.0.0' },
126+
{ name: '@hotwired/stimulus', version: '^3.0.0' },
127127
{ name: 'preact', version: '^8.2.0 || ^10.0.0' }
128128
]);
129129

@@ -132,7 +132,7 @@ describe('package-helper', () => {
132132

133133
it('Check package with a version too low', () => {
134134
const versionProblems = packageHelper.getInvalidPackageVersionRecommendations([
135-
{ name: 'stimulus', version: '^3.0.0' },
135+
{ name: '@hotwired/stimulus', version: '^4.0.0' },
136136
{ name: 'preact', version: '9.0.0' }
137137
]);
138138

@@ -142,7 +142,7 @@ describe('package-helper', () => {
142142

143143
it('Check package with a version too new', () => {
144144
const versionProblems = packageHelper.getInvalidPackageVersionRecommendations([
145-
{ name: 'stimulus', version: '^1.6' },
145+
{ name: '@hotwired/stimulus', version: '^2.0' },
146146
{ name: 'preact', version: '8.1.0' }
147147
]);
148148

0 commit comments

Comments
 (0)