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

Resolve ember-modifier deprecations #11

Conversation

bertdeblock
Copy link
Contributor

@bertdeblock bertdeblock commented Apr 7, 2022

New deprecations were introduced in ember-modifier v3.2.
The migration guide can be found here.

Closes #12.

@mayatron
Copy link

Can this be merged?

@jacobq
Copy link
Contributor

jacobq commented May 27, 2022

Here's how I am using this PR version in my app (ugly, but seems to work!):

"scripts": {
      "postinstall": "node clone-monorepo-forks.cjs",
// clone-monorepo-forks.cjs

const { execSync } = require('child_process');
const { existsSync, mkdirSync } = require('fs');
const path = require('path');
const debug = require('debug')('clone-monorepo-forks');

const forkRook = path.join(__dirname, 'forks');
const forks = [{
  name: 'ember-on-resize-modifier',
  cloneDir: 'ember-resize-kitchen-sink',
  repository: 'https://github.com/bertdeblock/ember-resize-kitchen-sink.git',
  commitish: '50009b19735ac834ce3606cc9acb97457d1e5aaf',
  subfolder: 'packages/ember-on-resize-modifier',
}];
debug(`Setting up clones of these forks:`, forks);

if (!existsSync(forkRook)) {
  debug(`Creating ${forkRook} folder`);
  mkdirSync(forkRook);
}

for (const { name, repository, cloneDir, commitish, subfolder } of forks) {
  if (!existsSync(path.join(forkRook, cloneDir))) {
    debug(`Setting up ${name} fork`);
    const commands = [
      [`git clone ${repository} ${cloneDir}`, { cwd: forkRook }],
      [`git checkout ${commitish}`, { cwd: path.join(forkRook, cloneDir) }],
      [`yarn link`, { cwd: path.join(forkRook, cloneDir, subfolder) }],
      [`yarn link ${name}`],
    ];
    for (const [command, additionalOptions = {}] of commands) {
      const options = { encoding: 'utf-8', ...additionalOptions };
      debug(`About to run ${command} with options:`, options);
      const stdout = execSync(command, options);
      debug(stdout);
    }
    debug(`Finished setting up ${name} fork`);
  } else {
    debug(`Skipping ${name} fork setup (directory already exists)`);
  }
}

Copy link
Contributor

@jherdman jherdman left a comment

Choose a reason for hiding this comment

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

Many thanks! Apologies for taking so long to get to this. I'll try and cut a release shortly.

@jherdman jherdman merged commit 57baec7 into PrecisionNutrition:main May 28, 2022
@bertdeblock
Copy link
Contributor Author

@jherdman No worries and thank you!

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.

Deprecation warnings from ember-modifier [use-modify & no-args-property]
4 participants