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

Replace chordSheetJs with chord-mark-converters package #529

Merged
merged 13 commits into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* eslint-env node */
const presets = [
[
'@babel/preset-env',
{
targets: {
browsers: 'defaults',
},
corejs: '3.0',
useBuiltIns: 'usage',
},
],
'@babel/preset-react',
];

module.exports = { presets };
31 changes: 31 additions & 0 deletions jest.config.base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* eslint-env node */
module.exports = {
testEnvironment: 'jsdom',
rootDir: __dirname,

collectCoverage: true,
collectCoverageFrom: ['<rootDir>/packages/chord-charts-studio/src/**/*.js'],
coverageDirectory: '<rootDir>/coverage',
coverageReporters: ['json', 'lcov', 'text', 'clover'],
coverageThreshold: {
global: {
branches: 99,
functions: 99,
lines: 99,
statements: 99,
},
},

transform: {
'\\.js$': 'babel-jest',
'\\.hbs$': 'jest-handlebars',
'\\.txt': 'jest-raw-loader',
},
// whitelisting local modules in the node_modules folder
transformIgnorePatterns: ['<rootDir>.*(node_modules)(?!.*chord-mark.*).*$'],

moduleNameMapper: {
'\\.(css|scss)$': '<rootDir>/tests/styleMock.js',
'\\.(png)$': '<rootDir>/tests/assetMock.js',
},
};
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* eslint-env node */
const baseConfig = require('./jest.config.base');

module.exports = {
...baseConfig,
projects: ['<rootDir>/packages/*/jest.config.js'],
};
24 changes: 12 additions & 12 deletions packages/chord-charts-studio/SLOC
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,53 @@ Source code:

---------- Result ------------

Physical : 6330
Source : 5236
Physical : 6183
Source : 5117
Comment : 128
Single-line comment : 60
Block comment : 68
Mixed : 6
Empty block comment : 0
Empty : 972
Empty : 944
To Do : 0

Number of files read : 145
Number of files read : 142

----------------------------

Tests:

---------- Result ------------

Physical : 7403
Source : 6102
Physical : 7167
Source : 5889
Comment : 65
Single-line comment : 58
Block comment : 7
Mixed : 8
Empty block comment : 0
Empty : 1244
Empty : 1221
To Do : 0

Number of files read : 71
Number of files read : 65

----------------------------

Total:

---------- Result ------------

Physical : 13733
Source : 11338
Physical : 13350
Source : 11006
Comment : 193
Single-line comment : 118
Block comment : 75
Mixed : 14
Empty block comment : 0
Empty : 2216
Empty : 2165
To Do : 0

Number of files read : 216
Number of files read : 207

----------------------------

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/chord-charts-studio/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-EGKBT2J600');</script><link rel="icon" href="app/favicon.ico"><script defer="defer" src="app/vendors.8021d68be529720cfa48.js"></script><script defer="defer" src="app/main.8021d68be529720cfa48.js"></script><link href="app/css/main.8021d68be529720cfa48.css" rel="stylesheet"></head><body><div id="app" class="theme-dark"></div></body></html>
gtag('config', 'G-EGKBT2J600');</script><link rel="icon" href="app/favicon.ico"><script defer="defer" src="app/vendors.eda2da7c7e10c33e1838.js"></script><script defer="defer" src="app/main.eda2da7c7e10c33e1838.js"></script><link href="app/css/main.eda2da7c7e10c33e1838.css" rel="stylesheet"></head><body><div id="app" class="theme-dark"></div></body></html>

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -74,30 +74,3 @@ and limitations under the License.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**!

@license
handlebars v4.7.7

Copyright (C) 2011-2019 by Yehuda Katz

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.

*/

Large diffs are not rendered by default.

35 changes: 9 additions & 26 deletions packages/chord-charts-studio/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,17 @@
/* eslint-env node */
const baseConfig = require('../../jest.config.base');
const packageJson = require('./package');

module.exports = {
testEnvironment: 'jsdom',
...baseConfig,
name: packageJson.name,
displayName: packageJson.name,

collectCoverage: true,
collectCoverageFrom: ['src/**/*.js', '!src/main.js', '!**/node_modules/**'],
coverageDirectory: '<rootDir>/coverage',
rootDir: '../..',
coveragePathIgnorePatterns: [
'node_modules',
'src/core/createGetVersions.js',
'packages/chord-charts-studio/src/main.js',
'packages/chord-charts-studio/src/core/createGetVersions.js',
],
coverageReporters: ['json', 'lcov', 'text', 'clover'],
coverageThreshold: {
global: {
branches: 99,
functions: 99,
lines: 99,
statements: 99,
},
},

transform: {
'\\.js$': 'babel-jest',
'\\.hbs$': 'jest-handlebars',
'\\.txt': 'jest-raw-loader',
},

setupFiles: ['jest-localstorage-mock'],

moduleNameMapper: {
'\\.(css|scss)$': '<rootDir>/scss/__mocks__/styleMock.js',
'\\.(png)$': '<rootDir>/assets/__mocks__/assetMock.js',
},
};
5 changes: 2 additions & 3 deletions packages/chord-charts-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
"@testing-library/user-event": "^13.5.0"
},
"dependencies": {
"chord-mark": "^0.9.0",
"chord-mark-2-chordpro": "^0.9.0",
"chord-mark": "^0.10.0-beta.6",
"chord-mark-converters": "^0.10.0-beta.8",
"chord-mark-themes": "^0.9.1",
"chordsheetjs": "^5.1.2",
"combine-section-reducers": "^1.0.6",
"core-js": "^3.20.0",
"dompurify": "^2.2.9",
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion packages/chord-charts-studio/src/core/getVersions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading