Skip to content
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
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: 9
run_install: true
- uses: wyvox/action-setup-pnpm@v3
- name: Run Tests
working-directory: ./test-app
run: pnpm test
37 changes: 37 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Because this library needs to be built,
# we can't easily point package.json files at the git repo for easy cross-repo testing.
#
# This workflow brings back that capability by placing the compiled assets on a "dist" branch
# (configurable via the "branch" option below)
name: Push dist

on:
push:
branches:
- main
- test
- master

jobs:
push-dist:
name: Push dist
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
with:
branch: dist
working-directory: ember-immer-changeset
omit-scripts: '*'
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions ember-immer-changeset/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
/dist/
/tmp/

declarations

# dependencies
/bower_components/
/node_modules/
Expand Down
50 changes: 50 additions & 0 deletions ember-immer-changeset/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* This babel.config is not used for publishing.
* It's only for the local editing experience
* (and linting)
*/
const { buildMacros } = require('@embroider/macros/babel');

const {
babelCompatSupport,
templateCompatSupport,
} = require('@embroider/compat/babel');

const macros = buildMacros();

// For scenario testing
const isCompat = Boolean(process.env.ENABLE_COMPAT_BUILD);

module.exports = {
plugins: [
[
'@babel/plugin-transform-typescript',
{
allExtensions: true,
allowDeclareFields: true,
onlyRemoveTypeImports: true,
},
],
[
'babel-plugin-ember-template-compilation',
{
transforms: [
...(isCompat ? templateCompatSupport() : macros.templateMacros),
],
},
],
[
'module:decorator-transforms',
{
runtime: {
import: require.resolve('decorator-transforms/runtime-esm'),
},
},
],
...(isCompat ? babelCompatSupport() : macros.babelMacros),
],

generatorOpts: {
compact: false,
},
};
9 changes: 0 additions & 9 deletions ember-immer-changeset/babel.config.json

This file was deleted.

36 changes: 36 additions & 0 deletions ember-immer-changeset/babel.publish.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* This babel.config is only used for publishing.
*
* For local dev experience, see the babel.config
*/
module.exports = {
plugins: [
[
'@babel/plugin-transform-typescript',
{
allExtensions: true,
allowDeclareFields: true,
onlyRemoveTypeImports: true,
},
],
[
'babel-plugin-ember-template-compilation',
{
targetFormat: 'hbs',
transforms: [],
},
],
[
'module:decorator-transforms',
{
runtime: {
import: 'decorator-transforms/runtime-esm',
},
},
],
],

generatorOpts: {
compact: false,
},
};
190 changes: 104 additions & 86 deletions ember-immer-changeset/package.json
Original file line number Diff line number Diff line change
@@ -1,115 +1,133 @@
{
"name": "ember-immer-changeset",
"version": "1.0.2",
"description": "A changeset library for emberJS using ImmerJS.",
"version": "2.0.0",
"private": false,
"description": "Dummy ember V2 addon to test importation",
"keywords": [
"ember-addon",
"changeset",
"immer",
"validation",
"typescript"
"ember-addon"
],
"maintainers": [
{
"name": "AmauryD"
}
],
"repository": "https://github.com/TRIPTYK/ember-immer-changeset",
"repository": "",
"license": "MIT",
"author": "TRIPTYK",
"directories": {
"test": "tests"
"author": "",
"imports": {
"#src/*": "./src/*"
},
"exports": {
".": {
"types": "./declarations/index.d.ts",
"default": "./dist/index.js"
},
"./addon-main.js": "./addon-main.cjs",
"./*.css": "./dist/*.css",
"./*": {
"types": "./declarations/*.d.ts",
"default": "./dist/*.js"
}
},
"files": [
"addon-main.cjs",
"declarations",
"dist",
"src"
],
"scripts": {
"_test:ember-compatibility": "ember try:each",
"build": "rollup --config",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"format": "prettier . --cache --write",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\" --prefixColors auto && pnpm run format",
"lint:format": "prettier . --cache --check",
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"postpack": "rm -rf utils && rm -rf components",
"lint:publish": "pnpm build && publint run --level error",
"lint:types": "ember-tsc --noEmit",
"prepack": "rollup --config",
"start": "rollup --config --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"test:ember": "ember test"
},
"peerDependencies": {
"ember-source": ">=4.0.0"
"start": "vite dev",
"test": "vite build --mode=development --out-dir dist-tests && pnpm testem --file testem.cjs ci --port 0"
},
"dependencies": {
"@embroider/addon-shim": "~1.8.7",
"@glimmer/component": "~1.1.2",
"@glimmer/tracking": "~1.1.2",
"immer": "~10.0.3"
"@embroider/addon-shim": "^1.10.2",
"decorator-transforms": "^2.3.1",
"immer": "^11.1.3"
},
"devDependencies": {
"@babel/core": "^7.23.3",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@babel/runtime": "^7.23.4",
"@embroider/addon-dev": "^4.1.2",
"@tsconfig/ember": "~3.0.2",
"@types/ember__component": "~4.0.21",
"@types/ember__debug": "~4.0.7",
"@types/ember__object": "~4.0.11",
"@types/ember__owner": "~4.0.8",
"@types/events": "^3.0.3",
"ember-source": "~5.12.0",
"rollup": "^4.5.2",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-ts": "^3.2.0",
"@babel/core": "^7.28.6",
"@babel/eslint-parser": "^7.28.6",
"@babel/plugin-transform-typescript": "^7.28.6",
"@babel/runtime": "^7.28.6",
"@ember/app-tsconfig": "^2.0.0",
"@ember/library-tsconfig": "^2.0.0",
"@ember/string": "^4.0.1",
"@ember/test-helpers": "^5.4.1",
"@ember/test-waiters": "^4.1.1",
"@embroider/addon-dev": "^8.2.0",
"@embroider/compat": "^4.1.12",
"@embroider/core": "^4.4.2",
"@embroider/macros": "^1.19.6",
"@embroider/vite": "^1.5.0",
"@eslint/js": "^9.39.2",
"@glimmer/component": "^2.0.0",
"@glint/ember-tsc": "^1.0.9",
"@glint/template": "^1.7.3",
"@glint/tsserver-plugin": "^2.0.9",
"@release-it-plugins/lerna-changelog": "^8.0.1",
"@rollup/plugin-babel": "^6.1.0",
"@types/qunit": "^2.19.13",
"@types/rsvp": "^4.0.9",
"babel-plugin-ember-template-compilation": "^4.0.0",
"concurrently": "^9.2.1",
"dom-element-descriptors": "^0.5.1",
"ember-concurrency": "^5.1.0",
"ember-lifeline": "^7.0.0",
"ember-modifier": "^4.2.2",
"ember-page-title": "^9.0.3",
"ember-qunit": "^9.0.4",
"ember-route-template": "^1.0.3",
"ember-source": "^6.10.0",
"ember-strict-application-resolver": "^0.1.1",
"ember-template-lint": "^7.9.3",
"ember-truth-helpers": "^5.0.0",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-ember": "^12.7.5",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-n": "^17.23.2",
"globals": "^17.1.0",
"postcss": "^8.5.6",
"prettier": "^3.8.1",
"prettier-plugin-ember-template-tag": "^2.1.3",
"publint": "^0.3.17",
"qunit": "^2.25.0",
"qunit-dom": "^3.5.0",
"release-it": "^19.2.4",
"rollup": "^4.56.0",
"rollup-plugin-sass": "^1.15.3",
"rsvp": "^4.8.5",
"type-fest": "~4.8.2",
"typedoc": "^0.25.3",
"typescript": "~5.3.2",
"webpack": "^5.89.0"
},
"engines": {
"node": "14.* || 16.* || >= 18"
"sass": "^1.97.3",
"sass-embedded": "^1.97.3",
"testem": "^3.17.0",
"type-fest": "^5.4.2",
"typescript": "~5.9.3",
"typescript-eslint": "^8.53.1",
"vite": "^7.3.1"
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"version": 2,
"type": "addon",
"main": "addon-main.cjs",
"app-js": {
"./changeset/immer-changeset.js": "./dist/_app_/changeset/immer-changeset.js",
"./components/test.js": "./dist/_app_/components/test.js",
"./helpers/changeset-get.js": "./dist/_app_/helpers/changeset-get.js",
"./index.js": "./dist/_app_/index.js",
"./utils/event-emitter.js": "./dist/_app_/utils/event-emitter.js",
"./utils/get-last-versions.js": "./dist/_app_/utils/get-last-versions.js",
"./utils/is-changeset.js": "./dist/_app_/utils/is-changeset.js"
},
"main": "addon-main.cjs",
"type": "addon",
"version": 2,
"versionCompatibility": {
"ember": ">3.0.0 < 5.0.0"
}
},
"volta": {
"node": "18.18.0"
},
"packageManager": "pnpm@7.28.0",
"exports": {
".": "./dist/index.js",
"./*": {
"types": "./dist/*.d.ts",
"default": "./dist/*.js"
},
"./addon-main.js": "./addon-main.cjs"
},
"files": [
"addon-main.cjs",
"dist"
],
"typesVersions": {
"*": {
"*": [
"dist/*"
]
}
"extends": "../package.json"
}
}
Loading