3 Commits

20 changed files with 1184 additions and 1940 deletions

View File

@ -17,11 +17,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24.x'
node-version: '20.x'
- run: npm version
- run: npm ci

View File

@ -5,7 +5,6 @@ on:
branches:
- 'master'
- 'main'
workflow_dispatch:
jobs:
update_release_draft:

View File

@ -17,13 +17,13 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24.x'
node-version: '20.x'
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

View File

@ -31,14 +31,14 @@ See [action.yml](action.yml)
## default ```settings.xml```
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
```
## ```settings.xml``` with servers section
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
servers: '[{"id": "serverId", "username": "username", "password": "password"}]'
```
@ -62,7 +62,7 @@ Please refer to the [servers](http://maven.apache.org/settings.html#Servers) doc
``` yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
servers: |
[{
@ -96,7 +96,7 @@ result will be:
## ```settings.xml``` with mirrors section
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
mirrors: '[{"id": "mirrorId", "name": "mirrorName", "mirrorOf": "mirrorOf", "url": "mirrorUrl"}]'
```
@ -104,7 +104,7 @@ steps:
## ```settings.xml``` with proxies section
```yml
step:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
proxies: '[{"id": "proxyId", "active": "isActive", "protocol": "proxyProtocol", "host": "proxyHost", "port": "proxyPort", "nonProxyHosts": "nonProxyHost", "user": "proxUser", "password": "proxPassword"}]'
```
@ -113,16 +113,16 @@ Note: Authentication details are optional.
## ```settings.xml``` with properties
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
```
## ```settings.xml``` with https://central.sonatype.com/repository/maven-snapshots in repository list
## ```settings.xml``` with https://oss.sonatype.org/content/repositories/snapshots in repository list
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
sonatypeSnapshots: true
```
@ -131,7 +131,7 @@ steps:
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
apacheSnapshots: true
```
@ -139,7 +139,7 @@ steps:
## Do not override existing ```settings.xml```, from version **2.0** file is override by default :
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
override: false
```
@ -147,7 +147,7 @@ steps:
## Do not add github to server in ```settings.xml```, by default is added:
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
githubServer: false
```
@ -156,7 +156,7 @@ steps:
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
oracleServers: '[{"id": "serverId", "username": "username", "password": "password"}]'
```
@ -164,7 +164,7 @@ steps:
## ```settings.xml``` with [Oracle Maven Repository](https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9017)
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
oracleRepo: true
```
@ -172,7 +172,7 @@ steps:
## ```settings.xml``` with custom repositories
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
repositories: '[{"id":"repoId","name":"repoName","url":"url","snapshots":{"enabled":true}}]'
```
@ -180,7 +180,7 @@ steps:
## ```settings.xml``` with custom plugin repositories
```yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
pluginRepositories: '[{"id":"repoId","name":"repoName","url":"url","snapshots":{"enabled":true}}]'
```
@ -192,7 +192,7 @@ It is also possible pass in Github Secrets e.g.
``` yml
steps:
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
with:
servers: |
[{
@ -222,7 +222,7 @@ steps:
with:
java-version: 8
- uses: s4u/maven-settings-action@v4.0.0
- uses: s4u/maven-settings-action@v3.1.0
- run: mvn verify
```

View File

@ -51,6 +51,6 @@ inputs:
required: false
runs:
using: 'node24'
using: 'node20'
main: 'index.js'
post: 'cleanup.js'

View File

@ -130,8 +130,18 @@ test('run with all feature', () => {
</activation>
<repositories>
<repository>
<id>central-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots</url>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
@ -142,8 +152,18 @@ test('run with all feature', () => {
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots</url>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>

14
node_modules/.package-lock.json generated vendored
View File

@ -1,6 +1,6 @@
{
"name": "maven-settings-action",
"version": "4.0.0",
"version": "3.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
@ -49,9 +49,9 @@
}
},
"node_modules/@xmldom/xmldom": {
"version": "0.8.11",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
"integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
"version": "0.8.10",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
@ -67,9 +67,9 @@
}
},
"node_modules/undici": {
"version": "5.29.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
"version": "5.28.4",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz",
"integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==",
"license": "MIT",
"dependencies": {
"@fastify/busboy": "^2.0.0"

View File

@ -4,15 +4,6 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.8.11](https://github.com/xmldom/xmldom/compare/0.8.10...0.8.11)
### Fixed
- update `ownerDocument` when moving nodes between documents
Thank you, [@shunkica](https://github.com/shunkica), for your contributions
## [0.8.10](https://github.com/xmldom/xmldom/compare/0.8.9...0.8.10)
### Fixed

View File

@ -980,9 +980,6 @@ function _insertBefore(parent, node, child, _inDocumentAssertion) {
}
do{
newFirst.parentNode = parent;
// Update ownerDocument for each node being inserted
var targetDoc = parent.ownerDocument || parent;
_updateOwnerDocument(newFirst, targetDoc);
}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
_onUpdateChild(parent.ownerDocument||parent, parent);
//console.log(parent.lastChild.nextSibling == null)
@ -992,37 +989,6 @@ function _insertBefore(parent, node, child, _inDocumentAssertion) {
return node;
}
/**
* Recursively updates the ownerDocument property for a node and all its descendants
* @param {Node} node
* @param {Document} newOwnerDocument
* @private
*/
function _updateOwnerDocument(node, newOwnerDocument) {
if (node.ownerDocument === newOwnerDocument) {
return;
}
node.ownerDocument = newOwnerDocument;
// Update attributes if this is an element
if (node.nodeType === ELEMENT_NODE && node.attributes) {
for (var i = 0; i < node.attributes.length; i++) {
var attr = node.attributes.item(i);
if (attr) {
attr.ownerDocument = newOwnerDocument;
}
}
}
// Recursively update child nodes
var child = node.firstChild;
while (child) {
_updateOwnerDocument(child, newOwnerDocument);
child = child.nextSibling;
}
}
/**
* Appends `newChild` to `parentNode`.
* If `newChild` is already connected to a `parentNode` it is first removed from it.
@ -1048,11 +1014,6 @@ function _appendSingleChild (parentNode, newChild) {
}
parentNode.lastChild = newChild;
_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);
// Update ownerDocument for the new child and all its descendants
var targetDoc = parentNode.ownerDocument || parentNode;
_updateOwnerDocument(newChild, targetDoc);
return newChild;
}
@ -1081,7 +1042,7 @@ Document.prototype = {
return newChild;
}
_insertBefore(this, newChild, refChild);
_updateOwnerDocument(newChild, this);
newChild.ownerDocument = this;
if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {
this.documentElement = newChild;
}
@ -1097,7 +1058,7 @@ Document.prototype = {
replaceChild: function (newChild, oldChild) {
//raises
_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
_updateOwnerDocument(newChild, this);
newChild.ownerDocument = this;
if (oldChild) {
this.removeChild(oldChild);
}

View File

@ -1,71 +1,71 @@
{
"name": "@xmldom/xmldom",
"version": "0.8.11",
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
"keywords": [
"w3c",
"dom",
"xml",
"parser",
"javascript",
"DOMParser",
"XMLSerializer",
"ponyfill"
],
"homepage": "https://github.com/xmldom/xmldom",
"repository": {
"type": "git",
"url": "git://github.com/xmldom/xmldom.git"
},
"main": "lib/index.js",
"types": "index.d.ts",
"files": [
"CHANGELOG.md",
"LICENSE",
"readme.md",
"SECURITY.md",
"index.d.ts",
"lib"
],
"scripts": {
"lint": "eslint lib test",
"format": "prettier --write test",
"changelog": "auto-changelog --unreleased-only",
"start": "nodemon --watch package.json --watch lib --watch test --exec 'npm --silent run test && npm --silent run lint'",
"stryker": "stryker run",
"stryker:dry-run": "stryker run -m '' --reporters progress",
"test": "jest",
"testrelease": "npm test && eslint lib",
"version": "./changelog-has-version.sh",
"release": "np --no-yarn --test-script testrelease --branch release-0.8.x patch"
},
"engines": {
"node": ">=10.0.0"
},
"dependencies": {},
"devDependencies": {
"@stryker-mutator/core": "5.6.1",
"auto-changelog": "2.4.0",
"eslint": "8.25.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-es5": "1.5.0",
"eslint-plugin-prettier": "4.2.1",
"get-stream": "6.0.1",
"jest": "27.5.1",
"nodemon": "2.0.20",
"np": "9.2.0",
"prettier": "2.7.1",
"xmltest": "1.5.0",
"yauzl": "2.10.0"
},
"bugs": {
"url": "https://github.com/xmldom/xmldom/issues"
},
"license": "MIT",
"auto-changelog": {
"prepend": true,
"remote": "upstream",
"tagPrefix": "",
"template": "./auto-changelog.hbs"
}
"name": "@xmldom/xmldom",
"version": "0.8.10",
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
"keywords": [
"w3c",
"dom",
"xml",
"parser",
"javascript",
"DOMParser",
"XMLSerializer",
"ponyfill"
],
"homepage": "https://github.com/xmldom/xmldom",
"repository": {
"type": "git",
"url": "git://github.com/xmldom/xmldom.git"
},
"main": "lib/index.js",
"types": "index.d.ts",
"files": [
"CHANGELOG.md",
"LICENSE",
"readme.md",
"SECURITY.md",
"index.d.ts",
"lib"
],
"scripts": {
"lint": "eslint lib test",
"format": "prettier --write test",
"changelog": "auto-changelog --unreleased-only",
"start": "nodemon --watch package.json --watch lib --watch test --exec 'npm --silent run test && npm --silent run lint'",
"stryker": "stryker run",
"stryker:dry-run": "stryker run -m '' --reporters progress",
"test": "jest",
"testrelease": "npm test && eslint lib",
"version": "./changelog-has-version.sh",
"release": "np --no-yarn --test-script testrelease --branch release-0.8.x patch"
},
"engines": {
"node": ">=10.0.0"
},
"dependencies": {},
"devDependencies": {
"@stryker-mutator/core": "5.6.1",
"auto-changelog": "2.4.0",
"eslint": "8.25.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-es5": "1.5.0",
"eslint-plugin-prettier": "4.2.1",
"get-stream": "6.0.1",
"jest": "27.5.1",
"nodemon": "2.0.20",
"np": "7.6.2",
"prettier": "2.7.1",
"xmltest": "1.5.0",
"yauzl": "2.10.0"
},
"bugs": {
"url": "https://github.com/xmldom/xmldom/issues"
},
"license": "MIT",
"auto-changelog": {
"prepend": true,
"remote": "upstream",
"tagPrefix": "",
"template": "./auto-changelog.hbs"
}
}

View File

@ -1,7 +1,7 @@
'use strict'
const { parseSetCookie } = require('./parse')
const { stringify } = require('./util')
const { stringify, getHeadersList } = require('./util')
const { webidl } = require('../fetch/webidl')
const { Headers } = require('../fetch/headers')
@ -77,13 +77,14 @@ function getSetCookies (headers) {
webidl.brandCheck(headers, Headers, { strict: false })
const cookies = headers.getSetCookie()
const cookies = getHeadersList(headers).cookies
if (!cookies) {
return []
}
return cookies.map((pair) => parseSetCookie(pair))
// In older versions of undici, cookies is a list of name:value.
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
}
/**

View File

@ -1,9 +1,8 @@
'use strict'
/**
* @param {string} value
* @returns {boolean}
*/
const assert = require('assert')
const { kHeadersList } = require('../core/symbols')
function isCTLExcludingHtab (value) {
if (value.length === 0) {
return false
@ -264,11 +263,29 @@ function stringify (cookie) {
return out.join('; ')
}
let kHeadersListNode
function getHeadersList (headers) {
if (headers[kHeadersList]) {
return headers[kHeadersList]
}
if (!kHeadersListNode) {
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
(symbol) => symbol.description === 'headers list'
)
assert(kHeadersListNode, 'Headers cannot be parsed')
}
const headersList = headers[kHeadersListNode]
assert(headersList)
return headersList
}
module.exports = {
isCTLExcludingHtab,
validateCookieName,
validateCookiePath,
validateCookieValue,
toIMFDate,
stringify
stringify,
getHeadersList
}

View File

@ -22,14 +22,6 @@ const { isUint8Array, isArrayBuffer } = require('util/types')
const { File: UndiciFile } = require('./file')
const { parseMIMEType, serializeAMimeType } = require('./dataURL')
let random
try {
const crypto = require('node:crypto')
random = (max) => crypto.randomInt(0, max)
} catch {
random = (max) => Math.floor(Math.random(max))
}
let ReadableStream = globalThis.ReadableStream
/** @type {globalThis['File']} */
@ -115,7 +107,7 @@ function extractBody (object, keepalive = false) {
// Set source to a copy of the bytes held by object.
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
} else if (util.isFormDataLike(object)) {
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */

View File

@ -10,7 +10,6 @@ const {
isValidHeaderName,
isValidHeaderValue
} = require('./util')
const util = require('util')
const { webidl } = require('./webidl')
const assert = require('assert')
@ -564,9 +563,6 @@ Object.defineProperties(Headers.prototype, {
[Symbol.toStringTag]: {
value: 'Headers',
configurable: true
},
[util.inspect.custom]: {
enumerable: false
}
})

14
node_modules/undici/lib/pool.js generated vendored
View File

@ -73,20 +73,6 @@ class Pool extends PoolBase {
? { ...options.interceptors }
: undefined
this[kFactory] = factory
this.on('connectionError', (origin, targets, error) => {
// If a connection error occurs, we remove the client from the pool,
// and emit a connectionError event. They will not be re-used.
// Fixes https://github.com/nodejs/undici/issues/3895
for (const target of targets) {
// Do not use kRemoveClient here, as it will close the client,
// but the client cannot be closed in this state.
const idx = this[kClients].indexOf(target)
if (idx !== -1) {
this[kClients].splice(idx, 1)
}
}
})
}
[kGetDispatcher] () {

2
node_modules/undici/package.json generated vendored
View File

@ -1,6 +1,6 @@
{
"name": "undici",
"version": "5.29.0",
"version": "5.28.4",
"description": "An HTTP/1.1 client, written from scratch for Node.js",
"homepage": "https://undici.nodejs.org",
"bugs": {

2709
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "maven-settings-action",
"version": "4.0.0",
"version": "3.1.0",
"description": "Prepare maven settings",
"main": "index.js",
"scripts": {
@ -27,10 +27,10 @@
"homepage": "https://github.com/s4u/maven-settings-action#readme",
"dependencies": {
"@actions/core": "^1.10.1",
"@xmldom/xmldom": "^0.8.11"
"@xmldom/xmldom": "^0.8.10"
},
"devDependencies": {
"eslint": "^9.34.0",
"jest": "^30.1.2"
"eslint": "^9.14.0",
"jest": "^29.7.0"
}
}

View File

@ -592,8 +592,18 @@ test('addSonatypeSnapshots', () => {
</activation>
<repositories>
<repository>
<id>central-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots</url>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
@ -604,8 +614,18 @@ test('addSonatypeSnapshots', () => {
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots</url>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>

View File

@ -6,8 +6,18 @@
</activation>
<repositories>
<repository>
<id>central-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots</url>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
@ -18,8 +28,18 @@
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots</url>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>