Skip to content
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

New 5.x release #2900

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 11 additions & 14 deletions lib/install/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,21 @@
end
end

if Webpacker::VERSION =~ /^[0-9]+\.[0-9]+\.[0-9]+$/
say "Installing all JavaScript dependencies [#{Webpacker::VERSION}]"
run "yarn add @rails/webpacker@#{Webpacker::VERSION}"
else
say "Installing all JavaScript dependencies [from prerelease rails/webpacker]"
run "yarn add @rails/webpacker@next"
end
say "Installing all JavaScript dependencies [#{Webpacker::VERSION}]"
run "yarn add @rails/webpacker@5.x"

package_json = File.read("#{__dir__}/../../package.json")
webpack_version = package_json.match(/"webpack": "(.*)"/)[1]
webpack_cli_version = package_json.match(/"webpack-cli": "(.*)"/)[1]
if `yarn --version`.start_with?("2")
package_json = File.read("#{__dir__}/../../package.json")
webpack_version = package_json.match(/"webpack": "(.*)"/)[1]
webpack_cli_version = package_json.match(/"webpack-cli": "(.*)"/)[1]

# needed for experimental Yarn 2 support and should not harm Yarn 1
say "Installing webpack and webpack-cli as direct dependencies"
run "yarn add webpack@#{webpack_version} webpack-cli@#{webpack_cli_version}"
# needed for experimental Yarn 2 support and should not harm Yarn 1
say "Installing webpack and webpack-cli as direct dependencies"
run "yarn add webpack@#{webpack_version} webpack-cli@#{webpack_cli_version}"
end

say "Installing dev server for live reloading"
run "yarn add --dev webpack-dev-server"
run "yarn add --dev webpack-dev-server@3.x"

if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR > 1
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this also show up on Rails 6 and 6.1?

say "You need to allow webpack-dev-server host as allowed origin for connect-src.", :yellow
Expand Down
72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,52 +12,52 @@
"yarn": ">=1 <3"
},
"dependencies": {
"@babel/core": "^7.11.1",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-object-rest-spread": "^7.10.1",
"@babel/core": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-destructuring": "^7.10.1",
"@babel/plugin-transform-regenerator": "^7.10.1",
"@babel/plugin-transform-runtime": "^7.11.0",
"@babel/preset-env": "^7.11.0",
"@babel/runtime": "^7.11.2",
"babel-loader": "^8.1.0",
"@babel/plugin-transform-destructuring": "^7.12.1",
"@babel/plugin-transform-regenerator": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/runtime": "^7.12.5",
"babel-loader": "^8.2.2",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-macros": "^2.8.0",
"babel-plugin-macros": "^3.0.1",
"case-sensitive-paths-webpack-plugin": "^2.3.0",
"compression-webpack-plugin": "^4.0.0",
"core-js": "^3.6.5",
"css-loader": "^3.5.3",
"file-loader": "^6.0.0",
"flatted": "^3.0.4",
"compression-webpack-plugin": "^7.1.2",
"core-js": "^3.8.3",
"css-loader": "^5.0.1",
"file-loader": "^6.2.0",
"flatted": "^3.1.1",
"glob": "^7.1.6",
"js-yaml": "^3.14.0",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.14.1",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"js-yaml": "^4.0.0",
"mini-css-extract-plugin": "^1.3.4",
"node-sass": "^5.0.0",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"path-complete-extname": "^1.0.0",
"pnp-webpack-plugin": "^1.6.4",
"postcss-flexbugs-fixes": "^4.2.1",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^14.0.0",
"postcss-loader": "^4.1.0",
"postcss-preset-env": "^6.7.0",
"postcss-safe-parser": "^4.0.2",
"postcss-safe-parser": "^5.0.2",
"regenerator-runtime": "^0.13.7",
"sass-loader": "^8.0.2",
"style-loader": "^1.2.1",
"terser-webpack-plugin": "^4.0.0",
"webpack": "^4.44.1",
"webpack-assets-manifest": "^3.1.1",
"webpack-cli": "^3.3.12",
"webpack-sources": "^1.4.3"
"sass-loader": "^10.1.1",
"style-loader": "^2.0.0",
"terser-webpack-plugin": "^5.1.1",
"webpack": "^5.16.0",
"webpack-assets-manifest": "^5.0.1",
"webpack-cli": "^4.4.0",
"webpack-sources": "^2.2.0"
},
"devDependencies": {
"eslint": "^7.6.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.5",
"jest": "^26.2.2"
"eslint": "^7.18.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0",
"jest": "^26.6.3"
},
"jest": {
"testRegex": "(/__tests__/.*|(\\.|/))\\.jsx?$",
Expand Down