Skip to content

Commit

Permalink
Merge pull request #4778 from bdukes/yarn-3
Browse files Browse the repository at this point in the history
Use Yarn 3
  • Loading branch information
mitchelsellers authored Aug 13, 2021
2 parents 8dc2b45 + 3c6b8c5 commit de333bf
Show file tree
Hide file tree
Showing 51 changed files with 25,269 additions and 24,922 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ DNN [Pp]latform/Modules/ResourceManager/**/scripts/*-bundle.*
!DNN Platform/[Ww]ebsite/App_Data/FipsCompilanceAssemblies/Lucene.Net.dll

yarn-error.log
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

/Build/bin/
/.dotnet/
Expand Down
631 changes: 631 additions & 0 deletions .yarn/releases/yarn-3.0.0.cjs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.0.0.cjs
2 changes: 1 addition & 1 deletion Build/BuildScripts/AEModule.build
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<Target Name="RunYarnWorkspace">
<Message Importance="high" Text="Running Yarn for $(WorkingDirectory)" />

<Yarn Command="install --frozen-lockfile" WorkingDirectory="$(WorkingDirectory)" IgnoreExitCode="false" Condition="$(WorkingDirectory.Length) > 0" />
<Yarn Command="install --no-immutable" WorkingDirectory="$(WorkingDirectory)" IgnoreExitCode="false" Condition="$(WorkingDirectory.Length) > 0" />
<Yarn Command="build" WorkingDirectory="$(WorkingDirectory)" IgnoreExitCode="false" Condition="$(WorkingDirectory.Length) > 0" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"eslint-loader": "2.1.1",
"eslint-plugin-babel": "5.3.0",
"eslint-plugin-filenames": "1.3.2",
"eslint-plugin-import": "2.21.2",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-react": "7.11.1",
"eslint-plugin-spellcheck": "0.0.11",
"prop-types": "^15.7.2",
Expand Down Expand Up @@ -69,4 +69,4 @@
"superagent": "^3.2.1",
"url-loader": "1.1.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ module.exports = {
__dirname,
"../scripts/"
)
: settings.WebsitePath +
"\\DesktopModules\\ResourceManager\\scripts",
: path.join(settings.WebsitePath, "\\DesktopModules\\ResourceManager\\scripts"),
publicPath: isProduction ? "" : "http://localhost:8080/dist/",
filename: "resourceManager-bundle.js"
},
Expand Down
6,944 changes: 0 additions & 6,944 deletions DNN Platform/Modules/ResourceManager/ResourceManager.Web/yarn.lock

This file was deleted.

2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/AdminLogs.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
"webpack-cli": "3.1.2",
"webpack-dev-server": "^3.1.14"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
output: {
path: isProduction || settings.WebsitePath == ""
? path.resolve("../../Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.AdminLogs/scripts/bundles/")
: settings.WebsitePath + "\\DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.AdminLogs\\scripts\\bundles\\",
: path.join(settings.WebsitePath, "DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.AdminLogs\\scripts\\bundles\\"),
filename: "adminLogs-bundle.js",
publicPath: isProduction ? "" : "http://localhost:8080/dist/"
},
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Bundle.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@
"dependencies": {
"@dnnsoftware/dnn-react-common": "9.9.1"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
output: {
path: isProduction || settings.WebsitePath == ""
? path.resolve("../../Library/Dnn.PersonaBar.UI/admin/personaBar/scripts/exports/")
: settings.WebsitePath + "\\DesktopModules\\Admin\\Dnn.PersonaBar\\scripts\\exports\\",
: path.join(settings.WebsitePath, "DesktopModules\\Admin\\Dnn.PersonaBar\\scripts\\exports\\"),
filename: "export-bundle.js",
publicPath: isProduction ? "" : "http://localhost:8070/dist/"
},
Expand Down
5 changes: 2 additions & 3 deletions Dnn.AdminExperience/ClientSide/Dnn.React.Common/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@dnnsoftware/dnn-react-common",
"version": "9.9.1",
"private": false,
"description": "DNN React Component Library",
"main": "dist/dnn-react-common.min.js",
"repository": {
Expand Down Expand Up @@ -69,7 +68,7 @@
"eslint-loader": "^4.0.2",
"eslint-plugin-babel": "^5.2.1",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-jest": "^22.0.0",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-spellcheck": "0.0.11",
Expand Down Expand Up @@ -98,4 +97,4 @@
"react-dom": "^16.4.2",
"react-hot-loader": "^4.8.5"
}
}
}
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Extensions.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.14"
}
}
}
182 changes: 92 additions & 90 deletions Dnn.AdminExperience/ClientSide/Extensions.Web/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,124 +1,126 @@
const webpack = require("webpack");
const packageJson = require("./package.json");
const path = require("path");
const isProduction = process.env.NODE_ENV === "production";
const webpackExternals = require("@dnnsoftware/dnn-react-common/WebpackExternals");
const settings = require("../../../settings.local.json");

module.exports = {
entry: "./src/main.jsx",
optimization: {
const webpack = require("webpack");
const packageJson = require("./package.json");
const path = require("path");
const isProduction = process.env.NODE_ENV === "production";
const webpackExternals = require("@dnnsoftware/dnn-react-common/WebpackExternals");
const settings = require("../../../settings.local.json");

module.exports = {
entry: "./src/main.jsx",
optimization: {
minimize: isProduction
},
output: {
path:
isProduction || settings.WebsitePath == ""
? path.resolve(
__dirname,
"../../Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.Extensions/scripts/bundles/"
)
: settings.WebsitePath +
"\\DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.Extensions\\scripts\\bundles\\",
publicPath: isProduction ? "" : "http://localhost:8080/dist/",
},
output: {
path:
isProduction || settings.WebsitePath == ""
? path.resolve(
__dirname,
"../../Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.Extensions/scripts/bundles/"
)
: path.join(
settings.WebsitePath,
"DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.Extensions\\scripts\\bundles\\"
),
publicPath: isProduction ? "" : "http://localhost:8080/dist/",
filename: "extensions-bundle.js"
},
devServer: {
},
devServer: {
disableHostCheck: !isProduction
},
resolve: {
extensions: ["*", ".js", ".json", ".jsx"],
modules: [
path.resolve("./src"), // Look in src first
path.resolve("./node_modules"), // Try local node_modules
},
resolve: {
extensions: ["*", ".js", ".json", ".jsx"],
modules: [
path.resolve("./src"), // Look in src first
path.resolve("./node_modules"), // Try local node_modules
path.resolve("../../../node_modules") // Last fallback to workspaces node_modules
]
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
enforce: "pre",
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
enforce: "pre",
use: ["eslint-loader"]
},
{
test: /\.less$/,
use: [
{
},
{
test: /\.less$/,
use: [
{
loader: "style-loader" // creates style nodes from JS strings
},
{
loader: "css-loader", // translates CSS into CommonJS
},
{
loader: "css-loader", // translates CSS into CommonJS
options: { modules: "global" }
},
{
},
{
loader: "less-loader" // compiles Less to CSS
}
]
},
{
test: /\.css$/,
use: [
{
},
{
test: /\.css$/,
use: [
{
loader: "style-loader"
},
{
loader: "css-loader",
},
{
loader: "css-loader",
options: { modules: "global" }
}
]
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env", "@babel/preset-react"]
}
}
},
{
test: /\.(ttf|woff)$/,
use: {
},
{
test: /\.(ttf|woff)$/,
use: {
loader: "url-loader?limit=8192"
}
},
{
test: /\.(gif|png)$/,
use: {
},
{
test: /\.(gif|png)$/,
use: {
loader: "url-loader?mimetype=image/png"
}
},
{
test: /\.woff(2)?(\?v=[0-9].[0-9].[0-9])?$/,
use: {
},
{
test: /\.woff(2)?(\?v=[0-9].[0-9].[0-9])?$/,
use: {
loader: "url-loader?mimetype=application/font-woff"
}
},
{
test: /\.(ttf|eot|svg)(\?v=[0-9].[0-9].[0-9])?$/,
use: {
},
{
test: /\.(ttf|eot|svg)(\?v=[0-9].[0-9].[0-9])?$/,
use: {
loader: "file-loader?name=[name].[ext]"
}
}
]
},
externals: webpackExternals,

plugins: isProduction
? [
new webpack.DefinePlugin({
VERSION: JSON.stringify(packageJson.version),
"process.env": {
},
externals: webpackExternals,

plugins: isProduction
? [
new webpack.DefinePlugin({
VERSION: JSON.stringify(packageJson.version),
"process.env": {
NODE_ENV: JSON.stringify("production")
}
})
]
: [
new webpack.DefinePlugin({
]
: [
new webpack.DefinePlugin({
VERSION: JSON.stringify(packageJson.version)
})
],
],
devtool: "source-map"
};
};
5 changes: 2 additions & 3 deletions Dnn.AdminExperience/ClientSide/Licensing.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@
"webpack-bundle-size-analyzer": "3.0.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.14"
},
"dependencies": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ module.exports = {
__dirname,
"../../Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.Licensing/scripts/bundles/"
)
: settings.WebsitePath +
"\\DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.Licensing\\scripts\\bundles\\",
: path.join(
settings.WebsitePath,
"DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.Licensing\\scripts\\bundles\\"
),
publicPath: isProduction ? "" : "http://localhost:8080/dist/",
filename: "licensing-bundle.js"
},
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Pages.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@
"react-day-picker": "^7.2.4",
"url-parse": "^1.2.0"
}
}
}
6 changes: 4 additions & 2 deletions Dnn.AdminExperience/ClientSide/Pages.Web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ module.exports = {
__dirname,
"../../Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.Pages/scripts/bundles/"
)
: settings.WebsitePath +
"\\DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.Pages\\scripts\\bundles\\",
: path.join(
settings.WebsitePath,
"DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.Pages\\scripts\\bundles\\"
),
filename: "pages-bundle.js",
publicPath: isProduction ? "" : "http://localhost:8080/dist/"
},
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Prompt.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
"dependencies": {
"html-react-parser": "^0.7.0"
}
}
}
6 changes: 4 additions & 2 deletions Dnn.AdminExperience/ClientSide/Prompt.Web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ module.exports = {
__dirname,
"../../Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.Prompt/scripts/bundles/"
)
: settings.WebsitePath +
"\\DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.Prompt\\scripts\\bundles\\",
: path.join(
settings.WebsitePath,
"DesktopModules\\Admin\\Dnn.PersonaBar\\Modules\\Dnn.Prompt\\scripts\\bundles\\"
),
publicPath: isProduction ? "" : "http://localhost:8100/dist/",
filename: "prompt-bundle.js"
},
Expand Down
Loading

0 comments on commit de333bf

Please sign in to comment.