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

[#IP-339] Migrate fp-ts version from 1.x to 2.x #91

Merged
merged 31 commits into from
Sep 16, 2021

Conversation

fabriziopapi
Copy link
Contributor

Update fp-ts version from 1.x to 2.x

List of Changes

Update fp-ts, io-ts, ts-commons and openapigen versions.
Fixed compilation errors due to different fp-ts 2.x version mode.
Fixed unit test compilation errors.
Refactor of saml.ts functions.

Motivation and Context

Reduce technical debt and enable dev to use new fp-ts feature.

How Has This Been Tested?

Already existing unit tests.

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@pagopa-github-bot
Copy link
Contributor

pagopa-github-bot commented Sep 10, 2021

Warnings
⚠️ Please include a Pivotal story at the beginning of the PR title (see below).
⚠️ This PR changes a total of 4183 LOCs, that is more than a reasonable size of 250. Consider splitting the pull request into smaller ones.

Example of PR titles that include pivotal stories:

  • single story: [#123456] my PR title
  • multiple stories: [#123456,#123457,#123458] my PR title

New dependencies added: @pagopa/ts-commons.

@pagopa/ts-commons

Author: https://www.pagopa.gov.it

Description: Shared TypeScript code for the IO project

Homepage: https://github.com/pagopa/io-ts-commons#readme

Created8 months ago
Last Updated9 days ago
LicenseMIT
Maintainers5
Releases12
Direct Dependenciesabort-controller, agentkeepalive, applicationinsights, fp-ts, io-ts, json-set-map, node-fetch and validator
README

Build Status

FOSSA Status

codecov

Maintainability

TypeScript Commons

This module provides code shared by the projects of the
IO App
initiative.

Documentation is available here

Contributing

In the following there are instructions to build the app in your computer for development purposes.

Pre-requisites

We built a script for helping setting up the laptop, you can find it here

Otherwise, please follow the following steps:

Install NodeJS

To run the project you need to install a properly version of NodeJS.

On macOS and Linux we recommend the use of a virtual environment, such as nodenv for managing multiple versions of NodeJS.
The node version used in this project is stored in .node-version.

If you already have nodenv installed and configured on your system, the correct version node will be set when you access the app directory.

To install, follow the steps described below.

Install brew

If you do not have it already, install brew following the installation instructions in the home page.

Install nodenv

brew install nodenv

Install yarn

For the management of javascript dependencies we use Yarn.

Yarn is a node application. IF you have already installed in your system version of node compatible with yarn, you can install it as a global command with:

npm install -g yarn

Install dependencies

Install the libraries used by the project:

$ yarn install --frozen-lockfile

Run Tests

Run Unit Tests

$ yarn test

Run Lint Check

$ yarn lint

Updating/publishing online docs

$ yarn docs

Releasing a version

Release has been automatized by using Azure Pipelines.

To release a new version please go to io-ts-commons project on Azure and manually run pagopa.io-ts-commons.deploy the pipeline.
Be aware to choose the right release version between major|minor|patch

License

FOSSA Status

Generated by 🚫 dangerJS against a8547c1

src/utils/middleware.ts Outdated Show resolved Hide resolved
src/utils/middleware.ts Outdated Show resolved Hide resolved
src/utils/middleware.ts Outdated Show resolved Hide resolved
src/utils/saml.ts Outdated Show resolved Hide resolved
src/utils/saml.ts Outdated Show resolved Hide resolved
src/utils/saml.ts Outdated Show resolved Hide resolved
@balanza
Copy link
Contributor

balanza commented Sep 15, 2021

@BurnedMarshal are we fine with latest changes?

src/utils/samlUtils.ts Outdated Show resolved Hide resolved
src/utils/samlUtils.ts Outdated Show resolved Hide resolved
src/utils/samlUtils.ts Outdated Show resolved Hide resolved
src/utils/samlUtils.ts Show resolved Hide resolved
src/utils/samlUtils.ts Outdated Show resolved Hide resolved
src/utils/samlUtils.ts Outdated Show resolved Hide resolved
src/utils/samlUtils.ts Outdated Show resolved Hide resolved
src/utils/samlUtils.ts Outdated Show resolved Hide resolved
src/utils/samlUtils.ts Outdated Show resolved Hide resolved
src/utils/samlUtils.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@BurnedMarshal BurnedMarshal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM apart latest minor changes. Thanks for the huge work in this PR.

src/utils/samlUtils.ts Outdated Show resolved Hide resolved
src/utils/saml.ts Outdated Show resolved Hide resolved
src/utils/saml.ts Outdated Show resolved Hide resolved
src/utils/saml.ts Outdated Show resolved Hide resolved
src/utils/saml.ts Outdated Show resolved Hide resolved
@fabriziopapi fabriziopapi merged commit 7e39637 into master Sep 16, 2021
@fabriziopapi fabriziopapi deleted the IP-339--migrate-fp-ts-version branch September 16, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants