Skip to content

Allowing @hotwired/stimulus, allowing @symfony/stimulus-bridge 3, dropping v1 #1062

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

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fixtures/stimulus/assets/controllers/hello_controller.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Controller } from 'stimulus';
import { Controller } from '@hotwired/stimulus';

export default class extends Controller {
connect() {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/stimulus/mock-module/dist/controller.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Controller } from 'stimulus';
import { Controller } from '@hotwired/stimulus';

export default class extends Controller {
connect() {
Expand Down
6 changes: 5 additions & 1 deletion fixtures/vuejs3-typescript/App.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<template>
<div id="app">
<img src="./assets/logo.png">
<img :src="logoPath">
<hello></hello>
</div>
</template>

<script lang="ts">
import Hello from './components/Hello.vue'
import logoPath from './assets/logo.png';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the package.json files are unrelated, but fix the tests. I'm not sure what's going on - it's super complex. It relates to this commit - vuejs/vue-loader@21725a4 - and vue-loader 16.7.0. Our testing setup is very vanilla, but for some reason, the <img src="./assets/logo.png"> no longer worked. I have no idea how to fix that - and it's so strange, that, for now, I'm going to assume it's some edge-case issue specific to our app or some bug that will be fixed upstream.


class TestClassSyntax {

Expand All @@ -16,6 +17,9 @@ export default {
name: 'app',
components: {
Hello
},
computed: {
logoPath: () => logoPath
}
}
</script>
Expand Down
3 changes: 0 additions & 3 deletions lib/config-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const friendlyErrorPluginUtil = require('./plugins/friendly-errors');
const assetOutputDisplay = require('./plugins/asset-output-display');
const notifierPluginUtil = require('./plugins/notifier');
const PluginPriorities = require('./plugins/plugin-priorities');
const stimulusBridge = require('./plugins/stimulus-bridge');
const applyOptionsCallback = require('./utils/apply-options-callback');
const copyEntryTmpName = require('./utils/copyEntryTmpName');
const getVueVersion = require('./utils/get-vue-version');
Expand Down Expand Up @@ -447,8 +446,6 @@ class ConfigGenerator {

variableProviderPluginUtil(plugins, this.webpackConfig);

stimulusBridge(plugins, this.webpackConfig);

cleanPluginUtil(plugins, this.webpackConfig);

definePluginUtil(plugins, this.webpackConfig);
Expand Down
3 changes: 1 addition & 2 deletions lib/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ const features = {
stimulus: {
method: 'enableStimulusBridge()',
packages: [
{ name: '@symfony/stimulus-bridge', enforce_version: true },
{ name: 'stimulus' }
{ name: '@symfony/stimulus-bridge', enforce_version: true }
],
description: 'enable Stimulus bridge'
}
Expand Down
48 changes: 0 additions & 48 deletions lib/plugins/stimulus-bridge.js

This file was deleted.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@
"@babel/plugin-transform-react-jsx": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.0.0",
"@hotwired/stimulus": "^3.0.0",
"@symfony/mock-module": "file:fixtures/stimulus/mock-module",
"@symfony/stimulus-bridge": "^1.1.0 || ^2.0.0",
"@symfony/stimulus-bridge": "^2.0.0 || ^3.0.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"@vue/babel-preset-jsx": "^1.0.0",
"@vue/compiler-sfc": "^3.0.2",
Expand Down Expand Up @@ -89,14 +90,13 @@
"sass": "^1.17.0",
"sass-loader": "^9.0.1 || ^10.0.0 || ^11.0.0 || ^12.0.0",
"sinon": "^9.0.2",
"stimulus": "^2.0.0",
"strip-ansi": "^6.0.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2 || ^4.0.0 || ^5.0.0",
"ts-loader": "^8.0.1 || ^9.0.0",
"typescript": ">=3.7.2",
"vue": "^3.0.2",
"vue-loader": "^16.1.0",
"ts-loader": "^9.0.0",
"typescript": "^4.2.2",
"vue": "^3.2.14",
"vue-loader": "^16.7.0",
"vue-template-compiler": "^2.5",
"webpack-notifier": "^1.6.0",
"zombie": "^6.1.4"
Expand Down
2 changes: 1 addition & 1 deletion test/functional.js
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ module.exports = {
const appDir = testSetup.createTestAppDir();

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

Expand Down
6 changes: 3 additions & 3 deletions test/package-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('package-helper', () => {
describe('The getInvalidPackageVersionRecommendations correctly checks installed versions', () => {
it('Check package that *is* the correct version', () => {
const versionProblems = packageHelper.getInvalidPackageVersionRecommendations([
{ name: 'stimulus', version: '^2.0.0' },
{ name: '@hotwired/stimulus', version: '^3.0.0' },
{ name: 'preact', version: '^8.2.0 || ^10.0.0' }
]);

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

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

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

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

Expand Down
Loading