czapp-shared 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitlab-ci.yml +25 -0
- package/package.json +2 -2
- package/test/util/util.test.ts +3 -5
package/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
image: node:18-alpine
|
|
2
|
+
|
|
3
|
+
stages:
|
|
4
|
+
- build
|
|
5
|
+
- test
|
|
6
|
+
|
|
7
|
+
build:
|
|
8
|
+
stage: build
|
|
9
|
+
script:
|
|
10
|
+
- npm install
|
|
11
|
+
cache:
|
|
12
|
+
paths:
|
|
13
|
+
- node_modules/
|
|
14
|
+
artifacts:
|
|
15
|
+
expire_in: 1 days
|
|
16
|
+
when: on_success
|
|
17
|
+
paths:
|
|
18
|
+
- node_modules/
|
|
19
|
+
|
|
20
|
+
unitTest:
|
|
21
|
+
stage: test
|
|
22
|
+
dependencies:
|
|
23
|
+
- build
|
|
24
|
+
script:
|
|
25
|
+
- npm run test:unit
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "czapp-shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "This is a shared library for Czapp projects. It contains common code that is used across multiple projects.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"typings": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"test
|
|
9
|
+
"test": "mocha --require ts-node/register/transpile-only test/**/*.ts",
|
|
10
10
|
"build": "tsup src/index.ts --clean --format=cjs,esm --dts",
|
|
11
11
|
"release:bump": "bumpp"
|
|
12
12
|
},
|
package/test/util/util.test.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
|
-
import { MySQLDate } from '../../lib';
|
|
3
2
|
import {
|
|
4
3
|
convertJSDateObjectToMySQLDateString,
|
|
5
4
|
convertJSDateStringToMySQLDate, dateDifferenceInDays, isClientDateTooFarFromServerDate,
|
|
6
5
|
isThePreviousDay,
|
|
7
|
-
isTheSameDay, isValidJsDateString, isValidMysqlDateString
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
isTheSameDay, isValidJsDateString, isValidMysqlDateString,
|
|
7
|
+
MySQLDate
|
|
8
|
+
} from '../../src';
|
|
11
9
|
describe('Date', () => {
|
|
12
10
|
describe('isTheSameDay', () => {
|
|
13
11
|
it('should return true if both dates are the same calendar day', () => {
|