Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enh/dx 1733 #75

Merged
merged 10 commits into from
Feb 19, 2025
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4
with:
node-version: "18.x"
node-version: "22.x"
- name: Installing dependencies
run: npm install
- name: Build
run: npm run prepack
- name: Upload dist
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: lib
path: lib
Expand All @@ -32,25 +32,25 @@ jobs:
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4
with:
node-version: "18.x"
node-version: "22.x"
- name: Installing dependencies
run: npm install
- name: Download dist
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: lib
path: lib
- name: Display dirs
run: ls -R
- name: Release
id: release-plugin
uses: JS-DevTools/npm-publish@v2.2.0
uses: JS-DevTools/npm-publish@v4
with:
token: ${{ secrets.NPM_TOKEN }}
- name: github-release
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
![Node.js CI](https://github.com/contentstack/contentstack-cli-content-type/workflows/Node.js%20CI/badge.svg)
![npm](https://img.shields.io/npm/v/contentstack-cli-content-type)

## Description
Expand Down
7 changes: 3 additions & 4 deletions src/core/content-type/formatting.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import moment from 'moment'
const urljoin = require('url-join')

import moment from 'moment'
import urlJoin from 'url-join';
const TIME_FORMAT = 'L hh:mm:ss a'

export function date(date: any) {
Expand Down Expand Up @@ -32,7 +31,7 @@ export function urlPattern(contentType: any) {
if (!contentType || !contentType.options) return 'Unknown'
if (!contentType.options.url_pattern) return 'N/A'

return urljoin(contentType.options.url_prefix, contentType.options.url_pattern)
return urlJoin(contentType.options.url_prefix, contentType.options.url_pattern)
}

export function checked(value: boolean) {
Expand Down