ember-codemod-v1-to-v2 0.7.0 → 0.7.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/dist/blueprints/ember-addon/__addonLocation__/.eslintignore +0 -8
- package/dist/blueprints/ember-addon/__addonLocation__/addon-main.cjs +0 -5
- package/dist/blueprints/ember-addon/__addonLocation__/babel.config.json +0 -9
- package/dist/blueprints/ember-addon/__addonLocation__/rollup.config.mjs +0 -64
- package/dist/blueprints/ember-addon/__addonLocation__/unpublished-development-types/index.d.ts +0 -14
- package/dist/blueprints/ember-addon/__gitignore__ +0 -24
- package/dist/blueprints/ember-addon/__testAppLocation__/ember-cli-build.js +0 -16
- package/dist/blueprints/ember-addon/__testAppLocation__/types/global.d.ts +0 -7
- package/dist/blueprints/ember-addon/package.json +0 -69
- package/dist/blueprints/ember-addon/pnpm-workspace.yaml +0 -3
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/__addonLocation__/.eslintignore +0 -0
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/__addonLocation__/addon-main.cjs +0 -0
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/__addonLocation__/babel.config.json +0 -0
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/__addonLocation__/rollup.config.mjs +0 -0
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/__addonLocation__/unpublished-development-types/index.d.ts +0 -0
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/__gitignore__ +0 -0
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/__testAppLocation__/ember-cli-build.js +0 -0
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/__testAppLocation__/types/global.d.ts +0 -0
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/package.json +0 -0
- /package/{dist/blueprints/blueprints → blueprints}/ember-addon/pnpm-workspace.yaml +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-codemod-v1-to-v2",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-alpha.1",
|
|
4
4
|
"description": "Codemod to convert Ember addons to v2 addon format",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codemod",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"test": "tests"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
+
"blueprints",
|
|
27
28
|
"dist"
|
|
28
29
|
],
|
|
29
30
|
"dependencies": {
|
|
@@ -71,13 +72,13 @@
|
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
"scripts": {
|
|
74
|
-
"build": "tsc --project tsconfig.build.json && chmod +x dist/bin/ember-codemod-v1-to-v2.js
|
|
75
|
+
"build": "tsc --project tsconfig.build.json && chmod +x dist/bin/ember-codemod-v1-to-v2.js",
|
|
75
76
|
"changelog": "lerna-changelog",
|
|
76
77
|
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
|
|
77
78
|
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
|
|
78
79
|
"lint:js": "eslint . --cache",
|
|
79
80
|
"lint:js:fix": "eslint . --fix",
|
|
80
81
|
"lint:types": "tsc --noEmit",
|
|
81
|
-
"test": "tsc --build &&
|
|
82
|
+
"test": "tsc --build && mt dist-for-testing --quiet"
|
|
82
83
|
}
|
|
83
84
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
<% if (options.packages.addon.hasTypeScript) { %> "presets": [["@babel/preset-typescript"]],
|
|
3
|
-
<% } %> "plugins": [
|
|
4
|
-
"@embroider/addon-dev/template-colocation-plugin",<% if (options.packages.addon.hasTypeScript) { %>
|
|
5
|
-
["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],<% } %>
|
|
6
|
-
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
|
|
7
|
-
"@babel/plugin-proposal-class-properties"
|
|
8
|
-
]
|
|
9
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<% if (options.packages.addon.hasTypeScript) { %>import typescript from 'rollup-plugin-ts';<% } else { %>import { babel } from '@rollup/plugin-babel';<% } %>
|
|
2
|
-
import copy from 'rollup-plugin-copy';
|
|
3
|
-
import { Addon } from '@embroider/addon-dev/rollup';
|
|
4
|
-
|
|
5
|
-
const addon = new Addon({
|
|
6
|
-
srcDir: 'src',
|
|
7
|
-
destDir: 'dist',
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
// This provides defaults that work well alongside `publicEntrypoints` below.
|
|
12
|
-
// You can augment this if you need to.
|
|
13
|
-
output: addon.output(),
|
|
14
|
-
|
|
15
|
-
plugins: [
|
|
16
|
-
// These are the modules that users should be able to import from your
|
|
17
|
-
// addon. Anything not listed here may get optimized away.
|
|
18
|
-
addon.publicEntrypoints([<%= context.addon.publicEntrypoints.map((filePath) => `'${filePath}'`).join(', ') %>]),
|
|
19
|
-
|
|
20
|
-
// These are the modules that should get reexported into the traditional
|
|
21
|
-
// "app" tree. Things in here should also be in publicEntrypoints above, but
|
|
22
|
-
// not everything in publicEntrypoints necessarily needs to go here.
|
|
23
|
-
addon.appReexports([<%= context.addon.appReexports.map((filePath) => `'${filePath}'`).join(', ') %>]),
|
|
24
|
-
|
|
25
|
-
// Follow the V2 Addon rules about dependencies. Your code can import from
|
|
26
|
-
// `dependencies` and `peerDependencies` as well as standard Ember-provided
|
|
27
|
-
// package names.
|
|
28
|
-
addon.dependencies(),
|
|
29
|
-
|
|
30
|
-
<% if (options.packages.addon.hasTypeScript) { %> // compile TypeScript to latest JavaScript, including Babel transpilation
|
|
31
|
-
typescript({
|
|
32
|
-
transpiler: 'babel',
|
|
33
|
-
browserslist: false,
|
|
34
|
-
transpileOnly: false,
|
|
35
|
-
}),
|
|
36
|
-
<% } else { %> // This babel config should *not* apply presets or compile away ES modules.
|
|
37
|
-
// It exists only to provide development niceties for you, like automatic
|
|
38
|
-
// template colocation.
|
|
39
|
-
//
|
|
40
|
-
// By default, this will load the actual babel config from the file
|
|
41
|
-
// babel.config.json.
|
|
42
|
-
babel({
|
|
43
|
-
babelHelpers: 'bundled',
|
|
44
|
-
}),
|
|
45
|
-
<% } %>
|
|
46
|
-
// Ensure that standalone .hbs files are properly integrated as Javascript.
|
|
47
|
-
addon.hbs(),
|
|
48
|
-
|
|
49
|
-
// addons are allowed to contain imports of .css files, which we want rollup
|
|
50
|
-
// to leave alone and keep in the published output.
|
|
51
|
-
addon.keepAssets(['**/*.css']),
|
|
52
|
-
|
|
53
|
-
// Remove leftover build artifacts when starting a new build.
|
|
54
|
-
addon.clean(),
|
|
55
|
-
|
|
56
|
-
// Copy Readme and License into published package
|
|
57
|
-
copy({
|
|
58
|
-
targets: [
|
|
59
|
-
{ src: '../README.md', dest: '.' },
|
|
60
|
-
{ src: '../LICENSE.md', dest: '.' },
|
|
61
|
-
],
|
|
62
|
-
}),
|
|
63
|
-
],
|
|
64
|
-
};
|
package/dist/blueprints/ember-addon/__addonLocation__/unpublished-development-types/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Add any types here that you need for local development only.
|
|
2
|
-
// These will *not* be published as part of your addon, so be careful that your published code does not rely on them!
|
|
3
|
-
<% if (options.packages.addon.hasGlint) { %>
|
|
4
|
-
import '@glint/environment-ember-loose';
|
|
5
|
-
|
|
6
|
-
declare module '@glint/environment-ember-loose/registry' {
|
|
7
|
-
// Remove this once entries have been added! 👇
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
9
|
-
export default interface Registry {
|
|
10
|
-
// Add any registry entries from other addons here that your addon itself uses (in non-strict mode templates)
|
|
11
|
-
// See https://typed-ember.gitbook.io/glint/using-glint/ember/using-addons
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
<% } %>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# compiled output
|
|
2
|
-
/dist/
|
|
3
|
-
|
|
4
|
-
# dependencies
|
|
5
|
-
/node_modules/
|
|
6
|
-
|
|
7
|
-
# misc
|
|
8
|
-
/.env*
|
|
9
|
-
/.pnp*
|
|
10
|
-
/.eslintcache
|
|
11
|
-
/coverage/
|
|
12
|
-
/npm-debug.log*
|
|
13
|
-
/testem.log
|
|
14
|
-
/yarn-error.log
|
|
15
|
-
|
|
16
|
-
# ember-try
|
|
17
|
-
/.node_modules.ember-try/
|
|
18
|
-
/npm-shrinkwrap.json.ember-try
|
|
19
|
-
/package.json.ember-try
|
|
20
|
-
/package-lock.json.ember-try
|
|
21
|
-
/yarn.lock.ember-try
|
|
22
|
-
|
|
23
|
-
# broccoli-debug
|
|
24
|
-
/DEBUG/
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
|
4
|
-
|
|
5
|
-
module.exports = function (defaults) {
|
|
6
|
-
const app = new EmberApp(defaults, {
|
|
7
|
-
// Add options here
|
|
8
|
-
autoImport: {
|
|
9
|
-
watchDependencies: ['<%= options.packages.addon.name %>'],
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const { maybeEmbroider } = require('@embroider/test-setup');
|
|
14
|
-
|
|
15
|
-
return maybeEmbroider(app);
|
|
16
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<% if (options.packageManager.isNpm) { %>{
|
|
2
|
-
"name": "<%= options.packages.addon.name %>",
|
|
3
|
-
"version": "<%= options.packages.addon.version %>",
|
|
4
|
-
"private": true,
|
|
5
|
-
"repository": "",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"author": "",
|
|
8
|
-
"workspaces": [
|
|
9
|
-
"<%= options.locations.addon %>",
|
|
10
|
-
"<%= options.locations.testApp %>"
|
|
11
|
-
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "npm run build --workspace <%= options.packages.addon.name %>",
|
|
14
|
-
"lint": "npm run lint --workspaces --if-present",
|
|
15
|
-
"lint:fix": "npm run lint:fix --workspaces --if-present",
|
|
16
|
-
"prepare": "npm run build",
|
|
17
|
-
"start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
|
|
18
|
-
"start:addon": "npm start --workspace <%= options.packages.addon.name %>",
|
|
19
|
-
"start:test-app": "npm start --workspace <%= options.packages.testApp.name %>",
|
|
20
|
-
"test": "npm run test --workspaces --if-present"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"concurrently": "<%= context.projectRoot.devDependencies['concurrently'] %>"
|
|
24
|
-
}
|
|
25
|
-
}<% } else if (options.packageManager.isPnpm) { %>{
|
|
26
|
-
"name": "<%= options.packages.addon.name %>",
|
|
27
|
-
"version": "<%= options.packages.addon.version %>",
|
|
28
|
-
"private": true,
|
|
29
|
-
"repository": "",
|
|
30
|
-
"license": "MIT",
|
|
31
|
-
"author": "",
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "pnpm --filter <%= options.packages.addon.name %> build",
|
|
34
|
-
"lint": "pnpm --filter '*' lint",
|
|
35
|
-
"lint:fix": "pnpm --filter '*' lint:fix",
|
|
36
|
-
"prepare": "pnpm build",
|
|
37
|
-
"start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
|
|
38
|
-
"start:addon": "pnpm --filter <%= options.packages.addon.name %> start",
|
|
39
|
-
"start:test-app": "pnpm --filter <%= options.packages.testApp.name %> start",
|
|
40
|
-
"test": "pnpm --filter '*' test"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"concurrently": "<%= context.projectRoot.devDependencies['concurrently'] %>"
|
|
44
|
-
}
|
|
45
|
-
}<% } else if (options.packageManager.isYarn) { %>{
|
|
46
|
-
"name": "<%= options.packages.addon.name %>",
|
|
47
|
-
"version": "<%= options.packages.addon.version %>",
|
|
48
|
-
"private": true,
|
|
49
|
-
"repository": "",
|
|
50
|
-
"license": "MIT",
|
|
51
|
-
"author": "",
|
|
52
|
-
"workspaces": [
|
|
53
|
-
"<%= options.locations.addon %>",
|
|
54
|
-
"<%= options.locations.testApp %>"
|
|
55
|
-
],
|
|
56
|
-
"scripts": {
|
|
57
|
-
"build": "yarn workspace <%= options.packages.addon.name %> run build",
|
|
58
|
-
"lint": "yarn workspaces run lint",
|
|
59
|
-
"lint:fix": "yarn workspaces run lint:fix",
|
|
60
|
-
"prepare": "yarn build",
|
|
61
|
-
"start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
|
|
62
|
-
"start:addon": "yarn workspace <%= options.packages.addon.name %> run start",
|
|
63
|
-
"start:test-app": "yarn workspace <%= options.packages.testApp.name %> run start",
|
|
64
|
-
"test": "yarn workspaces run test"
|
|
65
|
-
},
|
|
66
|
-
"devDependencies": {
|
|
67
|
-
"concurrently": "<%= context.projectRoot.devDependencies['concurrently'] %>"
|
|
68
|
-
}
|
|
69
|
-
}<% } %>
|
/package/{dist/blueprints/blueprints → blueprints}/ember-addon/__addonLocation__/.eslintignore
RENAMED
|
File without changes
|
/package/{dist/blueprints/blueprints → blueprints}/ember-addon/__addonLocation__/addon-main.cjs
RENAMED
|
File without changes
|
/package/{dist/blueprints/blueprints → blueprints}/ember-addon/__addonLocation__/babel.config.json
RENAMED
|
File without changes
|
/package/{dist/blueprints/blueprints → blueprints}/ember-addon/__addonLocation__/rollup.config.mjs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{dist/blueprints/blueprints → blueprints}/ember-addon/__testAppLocation__/types/global.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|