Skip to content

Commit

Permalink
Merge branch 'main' into OrchardCMS#15973-Getting-content-element-by-…
Browse files Browse the repository at this point in the history
…name-and-type-can-fail-even-if-valid
  • Loading branch information
hishamco authored May 9, 2024
2 parents f41bcc0 + 1ba8423 commit 6f64166
Show file tree
Hide file tree
Showing 31 changed files with 3,561 additions and 3,446 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -3140,6 +3140,15 @@
"contributions": [
"code"
]
},
{
"login": "TonyWoo",
"name": "tonywoo",
"avatar_url": "https://avatars.githubusercontent.com/u/689710?v=4",
"profile": "https://github.com/TonyWoo",
"contributions": [
"code"
]
}
],
"skipCi": true,
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Backport PR to branch

on:
issue_comment:
types: [created]
schedule:
# Once a day at 14:00 UTC to clean up old runs.
- cron: '0 14 * * *'

permissions:
contents: write
issues: write
pull-requests: write
actions: write

jobs:
backport:
if: ${{ contains(github.event.comment.body, '/backport to') || github.event_name == 'schedule' }}
uses: dotnet/arcade/.github/workflows/backport-base.yml@main
with:
repository_owners: 'OrchardCMS'

pr_description_template: |
Backport of #%source_pr_number% to %target_branch%
/cc %cc_users%
35 changes: 23 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ var fs = require("graceful-fs"),
merge = require("merge-stream"),
gulp = require("gulp"),
gulpif = require("gulp-if"),
print = require("gulp-print"),
debug = require("gulp-debug"),
newer = require("gulp-newer"),
plumber = require("gulp-plumber"),
sourcemaps = require("gulp-sourcemaps"),
Expand Down Expand Up @@ -53,7 +51,6 @@ gulp.task("rebuild-assets", function () {

// Continuous watch (each asset group is built whenever one of its inputs changes).
gulp.task("watch", function () {
var pathWin32 = require("path");
getAssetGroups().forEach(function (assetGroup) {
var watchPaths = assetGroup.inputPaths.concat(assetGroup.watchPaths);
var inputWatcher;
Expand All @@ -66,7 +63,7 @@ gulp.task("watch", function () {
else
console.log("Asset file '" + watchedPath + "' was changed, rebuilding asset group.");
var doRebuild = true;
var task = createAssetGroupTask(assetGroup, doRebuild);
createAssetGroupTask(assetGroup, doRebuild);
});
}

Expand Down Expand Up @@ -114,14 +111,29 @@ function getAssetGroups() {
function resolveAssetGroupPaths(assetGroup, assetManifestPath) {
assetGroup.manifestPath = assetManifestPath.replace(/\\/g, '/');
assetGroup.basePath = path.dirname(assetGroup.manifestPath);
var inputPaths = assetGroup.inputs.map(function (inputPath) {
return path.resolve(path.join(assetGroup.basePath, inputPath)).replace(/\\/g, '/');
});

// For wildcard input paths also sortthem to ensure file concatenation is consistent.
if (inputPaths.some(path => path.includes('*'))) {
inputPaths = glob.sync(inputPaths, {}).sort();
}
var inputPaths = [];

// The inputPaths can contain either a physical path to a file or a path with a wildcard.
// It's crucial to maintain the order of each file based on its position in the assets.json file.
// When a path contains a wildcard, we need to convert the wildcard to physical paths
// and sort them independently of the previous paths to ensure consistent concatenation.
assetGroup.inputs.forEach(inputPath => {

var resolvedPath = path.resolve(path.join(assetGroup.basePath, inputPath)).replace(/\\/g, '/');

if (resolvedPath.includes('*')) {
var sortedPaths = glob.sync(resolvedPath, {});

sortedPaths.sort();

sortedPaths.forEach(sortedPath => {
inputPaths.push(sortedPath.replace(/\\/g, '/'));
});
} else {
inputPaths.push(resolvedPath);
}
});

assetGroup.inputPaths = inputPaths;

Expand Down Expand Up @@ -263,7 +275,6 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
target: "es5",
};

console.log(assetGroup.inputPaths);
return gulp.src(assetGroup.inputPaths)
.pipe(gulpif(!doRebuild,
gulpif(doConcat,
Expand Down
126 changes: 0 additions & 126 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"gulp-cli": "^2.3.0",
"gulp-concat": "2.6.1",
"gulp-dart-sass": "1.1.0",
"gulp-debug": "4.0.0",
"gulp-eol": "0.2.0",
"gulp-header": "2.0.9",
"gulp-if": "3.0.0",
Expand All @@ -34,7 +33,6 @@
"gulp-newer": "1.4.0",
"gulp-plumber": "1.2.1",
"gulp-postcss": "^9.0.1",
"gulp-print": "5.0.2",
"gulp-rename": "2.0.0",
"gulp-sourcemaps": "^3.0.0",
"gulp-terser": "2.1.0",
Expand All @@ -46,7 +44,7 @@
"postcss": "8.4.28",
"postcss-rtl": "^2.0.0",
"rtlcss": "4.1.0",
"typescript": "^5.2.2",
"source-map": "^0.7.4"
"source-map": "^0.7.4",
"typescript": "^5.2.2"
}
}
10 changes: 5 additions & 5 deletions src/OrchardCore.Build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageManagement Include="Azure.Communication.Email" Version="1.0.1" />
<PackageManagement Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.1" />
<PackageManagement Include="Azure.Extensions.AspNetCore.DataProtection.Blobs" Version="1.3.4" />
<PackageManagement Include="Azure.Identity" Version="1.11.2" />
<PackageManagement Include="Azure.Identity" Version="1.11.3" />
<PackageManagement Include="Azure.Search.Documents" Version="11.5.1" />
<PackageManagement Include="Azure.Storage.Blobs" Version="12.19.1" />
<PackageManagement Include="BenchmarkDotNet" Version="0.13.12" />
Expand All @@ -29,7 +29,7 @@
<PackageManagement Include="Jint" Version="3.1.1" />
<PackageManagement Include="JsonPath.Net" Version="1.0.0" />
<PackageManagement Include="HtmlSanitizer" Version="8.1.860-beta" />
<PackageManagement Include="Irony.Core" Version="1.0.7" />
<PackageManagement Include="Irony" Version="1.5.1" />
<PackageManagement Include="libphonenumber-csharp" Version="8.13.36" />
<PackageManagement Include="Lorem.Universal.NET" Version="4.0.80" />
<PackageManagement Include="Lucene.Net" Version="4.8.0-beta00016" />
Expand All @@ -41,7 +41,7 @@
<PackageManagement Include="MessagePack" Version="2.2.60" />
<PackageManagement Include="Microsoft.Extensions.Azure" Version="1.7.3" />
<PackageManagement Include="Microsoft.Extensions.Http.Resilience" Version="8.4.0" />
<PackageManagement Include="Microsoft.Identity.Web" Version="2.18.0" />
<PackageManagement Include="Microsoft.Identity.Web" Version="2.18.1" />
<PackageManagement Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageManagement Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageManagement Include="MimeKit" Version="4.5.0" />
Expand All @@ -50,9 +50,9 @@
<PackageManagement Include="ncrontab" Version="3.3.3" />
<PackageManagement Include="NEST" Version="7.17.5" />
<PackageManagement Include="NJsonSchema" Version="11.0.0" />
<PackageManagement Include="NLog.Web.AspNetCore" Version="5.3.10" />
<PackageManagement Include="NLog.Web.AspNetCore" Version="5.3.11" />
<PackageManagement Include="NodaTime" Version="3.1.11" />
<PackageManagement Include="OpenIddict.Core" Version="5.4.0" />
<PackageManagement Include="OpenIddict.Core" Version="5.5.0" />
<PackageManagement Include="OpenIddict.Server.AspNetCore" Version="5.5.0" />
<PackageManagement Include="OpenIddict.Server.DataProtection" Version="5.5.0" />
<PackageManagement Include="OpenIddict.Validation.AspNetCore" Version="5.5.0" />
Expand Down
Loading

0 comments on commit 6f64166

Please sign in to comment.