Skip to content

Commit

Permalink
feat: new major release (#69)
Browse files Browse the repository at this point in the history
New controllers:
- [x] Launchpad Mini Mk3 support thanks to @chrneumann

New features & improvements:
- [x] Introduce a JSON compatible declarative configuration of layouts to make preset authoring easier
- [x] Sampler palette layout
- [x] Basic RGB LED support for HOTCUEs
- [x] RGB LED support for samplers
- [x] Library maximize / minimize button

Fixes:
- [x] Loopjump and beatjump modifiers work more consistently with the rest of the controls
- [x] Fixed retain attack mode bug causing incorrect behavior when shift/control changed between attack/release

Breaking changes:
- [x] Drop compatibility with Mixxx < 2.4 (old JS engine)

Developers:
- [x] Completely rewrite in TypeScript, ES2022
- [x] Simplify the code a lot, especially around Presets.
- [x] Remove lodash from dependencies, switched to using corejs polyfills.
- [x] Remove 'standard' style, using prettier for formatting
- [x] Using `engine.makeConnection` API to register control listeners
- [x] Refactor and moved `Component` and `MidiDevice` into `mixxx` package
- [x] Using ES modules and top-level await in tooling scripts
- [x] Update tooling to Node.js 18
---------

Co-authored-by: Christian Neumann <[email protected]>
Contains BREAKING CHANGE
  • Loading branch information
dszakallas committed Apr 30, 2023
1 parent 11a15c8 commit b3ec92f
Show file tree
Hide file tree
Showing 128 changed files with 6,207 additions and 15,824 deletions.
Empty file added .dockerignore
Empty file.
6 changes: 1 addition & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ insert_final_newline = true
indent_size = 2
indent_style = space
trim_trailing_whitepace = true

[**/*.{py,sh}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
max_line_length = 120

[Makefile]
indent_style = tab
Expand Down
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dist
node_modules
flow-typed
62 changes: 7 additions & 55 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,9 @@
env:
node: true
es6: true

extends: standard
parser: "@babel/eslint-parser"
extends:
- prettier
- 'plugin:@typescript-eslint/recommended'
parser: '@typescript-eslint/parser'
plugins:
- import
- flowtype
- '@typescript-eslint'
rules:
# sort-imports: error
import/no-duplicates: error
no-duplicate-imports: off # see https://github.com/babel/eslint-plugin-babel/issues/59
flowtype/boolean-style:
- 2
- boolean
flowtype/define-flow-type: 1
flowtype/delimiter-dangle:
- 2
- never
flowtype/generic-spacing:
- 2
- never
flowtype/no-primitive-constructor-types: 2
# flowtype/no-weak-types: 2
flowtype/object-type-delimiter:
- 2
- comma
# flowtype/require-parameter-type: 2
# flowtype/require-return-type:
# - 2
# - always
# - annotateUndefined: never
flowtype/require-valid-file-annotation: 2
flowtype/semi:
- 2
- never
flowtype/space-after-type-colon:
- 2
- always
flowtype/space-before-generic-bracket:
- 2
- never
flowtype/space-before-type-colon:
- 2
- never
flowtype/type-id-match:
- 2
- "^([A-Z][a-z0-9]+)+$"
flowtype/union-intersection-spacing:
- 2
- always
flowtype/use-flow-type: 1
flowtype/valid-syntax: 1
settings:
flowtype:
onlyFilesWithFlowAnnotation: false
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }]
no-warning-comments: warn
8 changes: 0 additions & 8 deletions .flowconfig

This file was deleted.

3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/dist
**/node_modules
**/tmp
4 changes: 4 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
trailingComma: 'all'
semi: false
singleQuote: true
tabWidth: 2
14 changes: 7 additions & 7 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
branches:
- master
- master
plugins:
- - "@semantic-release/commit-analyzer"
- - '@semantic-release/commit-analyzer'
- preset: conventionalcommits
parserOpts:
mergePattern: 'Merge pull request #(.*) from (.*)$'
mergeCorrespondence:
- pr
- branch
- - "@semantic-release/release-notes-generator"
- - '@semantic-release/release-notes-generator'
- preset: conventionalcommits
parserOpts:
mergePattern: 'Merge pull request #(.*) from (.*)$'
mergeCorrespondence:
- pr
- branch
- - "@semantic-release/exec"
- - '@semantic-release/exec'
- prepareCmd: make release builddir=dist/release version=${nextRelease.version}
- - "@semantic-release/github"
- - '@semantic-release/github'
- assets:
- path: dist/release/*.zip
label: Mixxx distribution
- path: dist/release/*.zip
label: Mixxx distribution
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ARG WORKDIR=/mixxx-launchpad
ARG UID=65532

FROM node:current-alpine AS deps
RUN apk add jq make bash
ARG WORKDIR
ARG UID
USER $UID
WORKDIR $WORKDIR
COPY <<-EOF $WORKDIR/.npmrc
cache=$WORKDIR/.npm
EOF
COPY package.json package-lock.json .
COPY packages/mixxx/package.json packages/mixxx/package.json
COPY packages/app/package.json packages/app/package.json
COPY packages/mk1/package.json packages/mk1/package.json
COPY packages/mk2/package.json packages/mk2/package.json
COPY packages/mini-mk3/package.json packages/mini-mk3/package.json
RUN --mount=type=cache,target=$WORKDIR/.npm,uid=$UID npm ci

FROM deps as build
COPY Makefile babel.config.js tsconfig.json .
COPY scripts scripts
COPY packages packages
RUN --mount=type=cache,target=$WORKDIR/dist,uid=$UID make

FROM scratch as dist
ARG WORKDIR
ARG UID
USER $UID
COPY --from=build --chown=$UID $WORKDIR/dist .
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 Dávid Szakállas and other contributors
Copyright (c) 2017 - 2023 Dávid Szakállas and other contributors
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
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ space := $(empty) $(empty)

join-with = $(subst $(space),$1,$(strip $2))

device = $(call join-with,\ ,$(shell jq -r .controller.device packages/$(1)/package.json))
manufacturer = $(call join-with,\ ,$(shell jq -r .controller.manufacturer packages/$(1)/package.json))
path = $(call join-with,\ ,$(shell jq -r .controller.path packages/$(1)/package.json))
device = $(call join-with,\ ,$(shell jq -r .device packages/$(1)/controller.json))
manufacturer = $(call join-with,\ ,$(shell jq -r .manufacturer packages/$(1)/controller.json))
path = "src"
mapping = $(builddir)/$(call manufacturer,$(1))\ $(call device,$(1)).midi.xml
script = $(builddir)/$(call manufacturer,$(1))-$(call device,$(1))-scripts.js

arch := $(shell uname)

# List the default Resource directories of Mixxx on different architectures
installDirDarwin := $(HOME)/Library/Application\ Support/Mixxx
installDirDarwin := $(HOME)/Library/Containers/org.mixxx.mixxx/Data/Library/Application Support/Mixxx
installDirLinux := $(HOME)/.mixxx

installDir ?= $(installDir$(arch))
Expand All @@ -23,8 +23,8 @@ package := ./package.json
builddir ?= ./dist
version ?= $(shell jq -r .version package.json)

scriptFiles = $(shell ls packages/*/!(node_modules)/**/*.js)
mappingFiles = $(package) packages/$(1)/$(path)/buttons.js packages/$(1)/$(path)/template.xml.ejs
scriptFiles = $(shell ls packages/*/!(node_modules)/**/*.ts)
mappingFiles = $(package) packages/$(1)/controller.json scripts/template.xml.ejs

targets := $(shell jq -r '.controllers | join (" ")' package.json)

Expand All @@ -45,8 +45,8 @@ endef

define installRule
install : $(foreach target,$(1),$(call mapping,$(target)) $(call script,$(target)))
cd $$(installDir) && mkdir -p controllers
cp $(foreach target,$(1),$(call mapping,$(target)) $(call script,$(target))) $$(installDir)/controllers
cd "$$(installDir)" && mkdir -p controllers
cp $(foreach target,$(1),$(call mapping,$(target)) $(call script,$(target))) "$$(installDir)/controllers"

.PHONY : install
endef
Expand Down
Loading

0 comments on commit b3ec92f

Please sign in to comment.