Skip to content

Commit

Permalink
Muuntaja copy features & maintenance (#60)
Browse files Browse the repository at this point in the history
* Add new implementation
* Add copy implementation (#57)
* Lots of initial development
* Add select reducer (#58)

* Lots of development and refactoring
* 6.0.0-beta.8

* new option compareWithoutTag and filter unique fields before add
* 6.0.0-beta.9

* more tests to compareWithoutTag
* Add new reducer parameters: skipIndicator1, skipIndicator2
* New test for compareWithoutIndicator1
* Fix tagPatternRegexp
* Support also reducers that return { base, source }
* 6.0.0-beta.10

* General fixes
* main reducer loop in index
** fix result for old school reducers
** use non-mutating variables/parameters

* update copy-reducer to handle input in ({base, source}) -format in addition to (base, source) -format
* update select-reducer to handle input in ({base, source}) -format in addition to (base, source) -format
* add extra test-spec that uses ({base, source}) input format for both copy- and select reducers
* update npm test and npm test:base
* more debug, use debug and debugData for debug
* Update deps

* 6.0.0-beta.11

* Maintenance update (#62)
* 7.0.0-alpha.1

* Maintenance2 (#63)
* 7.0.0-alpha.4

---------

Co-authored-by: natlibfi-arlehiko <[email protected]>
Co-authored-by: ssilvonen <[email protected]>
Co-authored-by: natlibesa <[email protected]>
Co-authored-by: Minttu Hurme <[email protected]>
Co-authored-by: nvolk <[email protected]>
  • Loading branch information
6 people authored Aug 10, 2023
1 parent e15d84d commit f509234
Show file tree
Hide file tree
Showing 581 changed files with 12,233 additions and 7,629 deletions.
10 changes: 0 additions & 10 deletions .editorconfig

This file was deleted.

2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# With this line @NatLibFi/melinda-js-lead owns any files in this repository
* @NatLibFi/melinda-js-lead
40 changes: 40 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# NatLibFi/Melinda maintenance strategy
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates

version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "06:30"
timezone: "Europe/Helsinki"
target-branch: "dependencies"

# Minor updates to npm production dependencies daily
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
time: "06:45"
timezone: "Europe/Helsinki"
versioning-strategy: lockfile-only
allow:
- dependency-type: "production"
target-branch: "dependencies"

# Major updates to npm dependencies weekly @tuesday
# Not possible yet https://github.com/dependabot/dependabot-core/issues/1778
# - package-ecosystem: "npm"
# directory: "/"
# schedule:
# interval: "weekly"
# day: "tuesday"
# time: "07:00"
# timezone: "Europe/Helsinki"
# versioning-strategy: increase-if-necessary
# labels:
# - "npm major dependencies"
# reviewers:
# - "natlibfi/melinda-js-lead"
60 changes: 60 additions & 0 deletions .github/workflows/melinda-node-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Melinda node tests

name: Melinda node tests

on: push

jobs:
build-node-versions:
name: Node version matrix
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
env:
NPM_CONFIG_IGNORE_SCRIPTS: true
- run: npm audit --package-lock-only --production --audit-level=moderate
- run: npm ci
- run: npm test
- run: npm run build --if-present

njsscan:
name: Njsscan check
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: nodejsscan scan
id: njsscan
uses: ajinabraham/njsscan-action@master
with:
args: '.'

publish:
runs-on: ubuntu-latest
needs: [build-node-versions, njsscan]
if: contains(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.MARC_RECORD_MERGE_JS_NPM_TOKEN }}
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
npm-debug.log
node_modules
dist
coverage
npm-debug.log
test/browser/main.js
.nyc_output
.vscode/launch.json
.DS_Store
6 changes: 0 additions & 6 deletions .istanbul.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .jshintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .jshintrc

This file was deleted.

4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
coverage
test/browser/main.js
npm-debug.log
node_modules
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-current University of Helsinki (National Library of Finland)

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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit f509234

Please sign in to comment.