Skip to content

Commit 1ef323a

Browse files
authored
Merge pull request #832 from nextcloud-libraries/chore/v2-4-0
chore: prepare v2.4.0
2 parents 1c6525a + 2c19509 commit 1ef323a

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ on:
1313
types: [published]
1414

1515
permissions:
16+
id-token: write # Required for OIDC
1617
contents: read
17-
packages: write
1818

1919
jobs:
2020
publish:
2121
runs-on: ubuntu-latest
2222
name: Build and publish to npm
23+
environment: npm-publish
2324

2425
steps:
2526
- name: Checkout
26-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2728
with:
2829
persist-credentials: false
2930

@@ -32,9 +33,10 @@ jobs:
3233
id: versions
3334

3435
- name: Set up node
35-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
36+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
3637
with:
3738
node-version: ${{ steps.versions.outputs.node-version }}
39+
registry-url: https://registry.npmjs.org
3840

3941
- name: Set up npm
4042
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
@@ -54,7 +56,7 @@ jobs:
5456
env:
5557
CYPRESS_INSTALL_BINARY: 0
5658
run: |
57-
npm ci
59+
npm ci --ignore-scripts
5860
npm run build --if-present
5961
6062
- name: Fetch latest tag
@@ -73,8 +75,6 @@ jobs:
7375

7476
- name: Publish
7577
run: |
76-
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
7778
npm publish --tag $RELEASE_GROUP
7879
env:
79-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8080
RELEASE_GROUP: ${{ (contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha')) && 'next' || ((steps.latest-tag.outputs.LATEST_TAG != github.event.release.tag_name) && 'stable' || 'latest') }}

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66

77
All notable changes to this project will be documented in this file.
88

9-
## 2.3.0 - 2025-11-07
9+
## 2.4.0 - 2025-11-14
10+
### Added
11+
* feat: add `extname` method
12+
### Changed
13+
* chore: add ESlint so we can enforce consistent code style
14+
15+
## 2.3.0 - 2025-11-12
1016
### Added
1117
* feat: add `join` method that deprecates `joinPaths`
1218

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,24 @@ npm i -S @nextcloud/paths
1919
## Usage
2020

2121
```js
22-
import { basename, dirname, encodePath, isSamePath, joinPaths } from '@nextcloud/paths'
22+
import { basename, dirname, extname, encodePath, isSamePath, join } from '@nextcloud/paths'
2323

2424
basename('/my/file.txt')
2525
// -> 'file.txt'
2626

2727
dirname('/my/file.txt')
2828
// -> '/my'
2929

30+
extname('/my/file.txt')
31+
// -> '.txt'
32+
3033
encodePath('/my/other file.txt')
3134
// -> '/my/other%20file'
3235

3336
isSamePath('/my/file.txt', 'my/file.txt')
3437
// -> true
3538

36-
joinPaths('/my', 'folder', 'file.txt')
39+
join('/my', 'folder', 'file.txt')
3740
// -> '/my/folder/file.txt'
3841
```
3942

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nextcloud/paths",
3-
"version": "2.3.0",
3+
"version": "2.4.0",
44
"description": "Helper functions for working with paths in Nextcloud apps",
55
"keywords": [
66
"nextcloud",

0 commit comments

Comments
 (0)