diff --git a/CHANGELOG.md b/CHANGELOG.md index c5429e3..f3b1f32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 1.0.0 + +Released on ?. + +- Fixed usage of document ready state (#87) @Sebbs128 +- Updated to use AngleSharp v1 +- Updated for Jint v3 (#89) @tomvanenckevort + # 0.15.0 Released on Sunday, June 12 2021. @@ -16,12 +24,12 @@ Released on Tuesday, March 31 2020. Released on Friday, September 6 2019. -- Added thread-based event loop implementation `JsEventLoop` -- Included new `WithEventLoop` configuration extensions +- Fixed missing `btoa` and `atob` functions (#55) +- Added `javascript:` URL handler (#47) +- Added new `WithEventLoop` configuration extensions +- Added support for .NET Standard 1.3 (#58) - Added constructors to `window` (#12) -- Fixed `btoa` and `atob` missing (#55) -- Included `javascript:` URL handler (#47) -- Included support for .NET Standard 1.3 (#58) +- Added thread-based event loop implementation `JsEventLoop` # 0.12.1 @@ -34,13 +42,13 @@ Released on Wednesday, May 15 2019. Released on Tuesday, May 14 2019. - Properly forward setting window.location (#31) -- Respect window.onload event (#42) -- Support for more APIs to enable jQuery (#43) -- Respect DOMContentLoaded event (#50) - Restored compatibility with AngleSharp v0.12 (#51) - Renamed to `AngleSharp.Js` (focus only on JavaScript) (#51) - Renamed the `WithJavaScript` extension method to `WithJs` -- Changed the namespace from `AngleSharp.Scripting.JavaScript` to `AngleSharp.Js` +- Updated the namespace from `AngleSharp.Scripting.JavaScript` to `AngleSharp.Js` +- Added support for window.onload event (#42) +- Added support for more APIs to enable jQuery (#43) +- Added support for DOMContentLoaded event (#50) # 0.5.1 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0850c88..19e5b64 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -8,6 +8,8 @@ AngleSharp.Js contains code written by (in order of first pull request / commit) * [Georgios Diamantopoulos](https://github.com/georgiosd) * [miroslav22](https://github.com/miroslav22) * [doominator42](https://github.com/doominator42) +* [Tom van Enckevort](https://github.com/tomvanenckevort) +* [Wayne Sebbens](https://github.com/Sebbs128) Without these awesome people AngleSharp.Js could not exist. Thanks to everyone for your contributions! :beers: diff --git a/LICENSE b/LICENSE index fddded2..10b5b1c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013 - 2021 AngleSharp +Copyright (c) 2013 - 2024 AngleSharp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index af0ffe6..2e010e0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # AngleSharp.Js -[![Build Status](https://img.shields.io/appveyor/ci/FlorianRappl/AngleSharp-Scripting.svg?style=flat-square)](https://ci.appveyor.com/project/FlorianRappl/AngleSharp-Scripting) +[![CI](https://github.com/AngleSharp/AngleSharp.Js/actions/workflows/ci.yml/badge.svg)](https://github.com/AngleSharp/AngleSharp.Js/actions/workflows/ci.yml) [![GitHub Tag](https://img.shields.io/github/tag/AngleSharp/AngleSharp.Js.svg?style=flat-square)](https://github.com/AngleSharp/AngleSharp.Js/releases) [![NuGet Count](https://img.shields.io/nuget/dt/AngleSharp.Js.svg?style=flat-square)](https://www.nuget.org/packages/AngleSharp.Js/) [![Issues Open](https://img.shields.io/github/issues/AngleSharp/AngleSharp.Js.svg?style=flat-square)](https://github.com/AngleSharp/AngleSharp.Js/issues) @@ -83,7 +83,7 @@ This project is supported by the [.NET Foundation](https://dotnetfoundation.org) The MIT License (MIT) -Copyright (c) 2015 - 2020 AngleSharp +Copyright (c) 2015 - 2024 AngleSharp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/src/AngleSharp.Js.nuspec b/src/AngleSharp.Js.nuspec index 29ddcdd..0b8f08e 100644 --- a/src/AngleSharp.Js.nuspec +++ b/src/AngleSharp.Js.nuspec @@ -6,29 +6,39 @@ AngleSharp Florian Rappl MIT + https://anglesharp.github.io logo.png + README.md false Integrates a JavaScript engine to AngleSharp. https://github.com/AngleSharp/AngleSharp.Js/blob/master/CHANGELOG.md - Copyright 2017-2021, AngleSharp + Copyright 2017-2024s, AngleSharp html html5 css css3 dom javascript scripting library js scripts runtime jint anglesharp angle - - + + - - - - - - - + + + - - + + + + + + + + + + + + + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index d5d4785..f3d6f9d 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -2,6 +2,9 @@ Integrates a JavaScript engine to AngleSharp. AngleSharp.Js - 0.15.0 + 1.0.0 + latest + true + $(MSBuildThisFileDirectory)\Key.snk \ No newline at end of file diff --git a/src/Key.snk b/src/Key.snk new file mode 100644 index 0000000..d43ce41 Binary files /dev/null and b/src/Key.snk differ diff --git a/tools/anglesharp.cake b/tools/anglesharp.cake deleted file mode 100644 index bfcc3bd..0000000 --- a/tools/anglesharp.cake +++ /dev/null @@ -1,199 +0,0 @@ -#addin "Cake.FileHelpers" -#addin "Octokit" -using Octokit; - -var configuration = Argument("configuration", "Release"); -var isRunningOnUnix = IsRunningOnUnix(); -var isRunningOnWindows = IsRunningOnWindows(); -var isRunningOnGitHubActions = BuildSystem.GitHubActions.IsRunningOnGitHubActions; -var releaseNotes = ParseReleaseNotes("./CHANGELOG.md"); -var version = releaseNotes.Version.ToString(); -var buildDir = Directory($"./src/{projectName}/bin") + Directory(configuration); -var buildResultDir = Directory("./bin") + Directory(version); -var nugetRoot = buildResultDir + Directory("nuget"); - -if (isRunningOnGitHubActions) -{ - var buildNumber = BuildSystem.GitHubActions.Environment.Workflow.RunNumber; - - if (target == "Default") - { - version = $"{version}-ci-{buildNumber}"; - } - else if (target == "PrePublish") - { - version = $"{version}-alpha-{buildNumber}"; - } -} - -if (!isRunningOnWindows) -{ - frameworks.Remove("net46"); - frameworks.Remove("net461"); - frameworks.Remove("net472"); -} - -// Initialization -// ---------------------------------------- - -Setup(_ => -{ - Information($"Building version {version} of {projectName}."); - Information("For the publish target the following environment variables need to be set:"); - Information("- NUGET_API_KEY"); - Information("- GITHUB_API_TOKEN"); -}); - -// Tasks -// ---------------------------------------- - -Task("Clean") - .Does(() => - { - CleanDirectories(new DirectoryPath[] { buildDir, buildResultDir, nugetRoot }); - }); - -Task("Restore-Packages") - .IsDependentOn("Clean") - .Does(() => - { - NuGetRestore($"./src/{solutionName}.sln", new NuGetRestoreSettings - { - ToolPath = "tools/nuget.exe", - }); - }); - -Task("Build") - .IsDependentOn("Restore-Packages") - .Does(() => - { - ReplaceRegexInFiles("./src/Directory.Build.props", "(?<=)(.+?)(?=)", version); - DotNetCoreBuild($"./src/{solutionName}.sln", new DotNetCoreBuildSettings - { - Configuration = configuration, - }); - }); - -Task("Run-Unit-Tests") - .IsDependentOn("Build") - .Does(() => - { - var settings = new DotNetCoreTestSettings - { - Configuration = configuration, - }; - - if (isRunningOnGitHubActions) - { - settings.Loggers.Add("GitHubActions"); - } - - DotNetCoreTest($"./src/{solutionName}.Tests/", settings); - }); - -Task("Copy-Files") - .IsDependentOn("Build") - .Does(() => - { - foreach (var item in frameworks) - { - var targetDir = nugetRoot + Directory("lib") + Directory(item.Key); - CreateDirectory(targetDir); - CopyFiles(new FilePath[] - { - buildDir + Directory(item.Value) + File($"{projectName}.dll"), - buildDir + Directory(item.Value) + File($"{projectName}.xml"), - }, targetDir); - } - - CopyFiles(new FilePath[] { - $"src/{projectName}.nuspec", - "logo.png" - }, nugetRoot); - }); - -Task("Create-Package") - .IsDependentOn("Copy-Files") - .Does(() => - { - var nugetExe = GetFiles("./tools/**/nuget.exe").FirstOrDefault() - ?? throw new InvalidOperationException("Could not find nuget.exe."); - - var nuspec = nugetRoot + File($"{projectName}.nuspec"); - - NuGetPack(nuspec, new NuGetPackSettings - { - Version = version, - OutputDirectory = nugetRoot, - Symbols = false, - Properties = new Dictionary - { - { "Configuration", configuration }, - }, - }); - }); - -Task("Publish-Package") - .IsDependentOn("Create-Package") - .IsDependentOn("Run-Unit-Tests") - .Does(() => - { - var apiKey = EnvironmentVariable("NUGET_API_KEY"); - - if (String.IsNullOrEmpty(apiKey)) - { - throw new InvalidOperationException("Could not resolve the NuGet API key."); - } - - foreach (var nupkg in GetFiles(nugetRoot.Path.FullPath + "/*.nupkg")) - { - NuGetPush(nupkg, new NuGetPushSettings - { - Source = "https://nuget.org/api/v2/package", - ApiKey = apiKey, - }); - } - }); - -Task("Publish-Release") - .IsDependentOn("Publish-Package") - .IsDependentOn("Run-Unit-Tests") - .Does(() => - { - var githubToken = EnvironmentVariable("GITHUB_TOKEN"); - - if (String.IsNullOrEmpty(githubToken)) - { - throw new InvalidOperationException("Could not resolve GitHub token."); - } - - var github = new GitHubClient(new ProductHeaderValue("AngleSharpCakeBuild")) - { - Credentials = new Credentials(githubToken), - }; - - var newRelease = github.Repository.Release; - newRelease.Create("AngleSharp", projectName, new NewRelease("v" + version) - { - Name = version, - Body = String.Join(Environment.NewLine, releaseNotes.Notes), - Prerelease = false, - TargetCommitish = "main", - }).Wait(); - }); - -// Targets -// ---------------------------------------- - -Task("Package") - .IsDependentOn("Run-Unit-Tests") - .IsDependentOn("Create-Package"); - -Task("Default") - .IsDependentOn("Package"); - -Task("Publish") - .IsDependentOn("Publish-Release"); - -Task("PrePublish") - .IsDependentOn("Publish-Package");